//===----------------------------------------------------------------------===//
//
// This source file is part of the Soto for AWS open source project
//
// Copyright (c) 2017-2021 the Soto project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for the list of Soto project authors
//
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//

// THIS FILE IS AUTOMATICALLY GENERATED by https://github.com/soto-project/soto/tree/main/CodeGenerator. DO NOT EDIT.

import Foundation
import SotoCore

extension Comprehend {
    // MARK: Enums

    public enum DocumentClassifierDataFormat: String, CustomStringConvertible, Codable {
        case augmentedManifest = "AUGMENTED_MANIFEST"
        case comprehendCsv = "COMPREHEND_CSV"
        public var description: String { return self.rawValue }
    }

    public enum DocumentClassifierMode: String, CustomStringConvertible, Codable {
        case multiClass = "MULTI_CLASS"
        case multiLabel = "MULTI_LABEL"
        public var description: String { return self.rawValue }
    }

    public enum EndpointStatus: String, CustomStringConvertible, Codable {
        case creating = "CREATING"
        case deleting = "DELETING"
        case failed = "FAILED"
        case inService = "IN_SERVICE"
        case updating = "UPDATING"
        public var description: String { return self.rawValue }
    }

    public enum EntityRecognizerDataFormat: String, CustomStringConvertible, Codable {
        case augmentedManifest = "AUGMENTED_MANIFEST"
        case comprehendCsv = "COMPREHEND_CSV"
        public var description: String { return self.rawValue }
    }

    public enum EntityType: String, CustomStringConvertible, Codable {
        case commercialItem = "COMMERCIAL_ITEM"
        case date = "DATE"
        case event = "EVENT"
        case location = "LOCATION"
        case organization = "ORGANIZATION"
        case other = "OTHER"
        case person = "PERSON"
        case quantity = "QUANTITY"
        case title = "TITLE"
        public var description: String { return self.rawValue }
    }

    public enum InputFormat: String, CustomStringConvertible, Codable {
        case oneDocPerFile = "ONE_DOC_PER_FILE"
        case oneDocPerLine = "ONE_DOC_PER_LINE"
        public var description: String { return self.rawValue }
    }

    public enum JobStatus: String, CustomStringConvertible, Codable {
        case completed = "COMPLETED"
        case failed = "FAILED"
        case inProgress = "IN_PROGRESS"
        case stopRequested = "STOP_REQUESTED"
        case stopped = "STOPPED"
        case submitted = "SUBMITTED"
        public var description: String { return self.rawValue }
    }

    public enum LanguageCode: String, CustomStringConvertible, Codable {
        case ar
        case de
        case en
        case es
        case fr
        case hi
        case it
        case ja
        case ko
        case pt
        case zh
        case zhTw = "zh-TW"
        public var description: String { return self.rawValue }
    }

    public enum ModelStatus: String, CustomStringConvertible, Codable {
        case deleting = "DELETING"
        case inError = "IN_ERROR"
        case stopRequested = "STOP_REQUESTED"
        case stopped = "STOPPED"
        case submitted = "SUBMITTED"
        case trained = "TRAINED"
        case training = "TRAINING"
        public var description: String { return self.rawValue }
    }

    public enum PartOfSpeechTagType: String, CustomStringConvertible, Codable {
        case adj = "ADJ"
        case adp = "ADP"
        case adv = "ADV"
        case aux = "AUX"
        case cconj = "CCONJ"
        case conj = "CONJ"
        case det = "DET"
        case intj = "INTJ"
        case noun = "NOUN"
        case num = "NUM"
        case o = "O"
        case part = "PART"
        case pron = "PRON"
        case propn = "PROPN"
        case punct = "PUNCT"
        case sconj = "SCONJ"
        case sym = "SYM"
        case verb = "VERB"
        public var description: String { return self.rawValue }
    }

    public enum PiiEntitiesDetectionMaskMode: String, CustomStringConvertible, Codable {
        case mask = "MASK"
        case replaceWithPiiEntityType = "REPLACE_WITH_PII_ENTITY_TYPE"
        public var description: String { return self.rawValue }
    }

    public enum PiiEntitiesDetectionMode: String, CustomStringConvertible, Codable {
        case onlyOffsets = "ONLY_OFFSETS"
        case onlyRedaction = "ONLY_REDACTION"
        public var description: String { return self.rawValue }
    }

    public enum PiiEntityType: String, CustomStringConvertible, Codable {
        case address = "ADDRESS"
        case age = "AGE"
        case all = "ALL"
        case awsAccessKey = "AWS_ACCESS_KEY"
        case awsSecretKey = "AWS_SECRET_KEY"
        case bankAccountNumber = "BANK_ACCOUNT_NUMBER"
        case bankRouting = "BANK_ROUTING"
        case creditDebitCvv = "CREDIT_DEBIT_CVV"
        case creditDebitExpiry = "CREDIT_DEBIT_EXPIRY"
        case creditDebitNumber = "CREDIT_DEBIT_NUMBER"
        case dateTime = "DATE_TIME"
        case driverId = "DRIVER_ID"
        case email = "EMAIL"
        case ipAddress = "IP_ADDRESS"
        case macAddress = "MAC_ADDRESS"
        case name = "NAME"
        case passportNumber = "PASSPORT_NUMBER"
        case password = "PASSWORD"
        case phone = "PHONE"
        case pin = "PIN"
        case ssn = "SSN"
        case url = "URL"
        case username = "USERNAME"
        public var description: String { return self.rawValue }
    }

    public enum SentimentType: String, CustomStringConvertible, Codable {
        case mixed = "MIXED"
        case negative = "NEGATIVE"
        case neutral = "NEUTRAL"
        case positive = "POSITIVE"
        public var description: String { return self.rawValue }
    }

    public enum SyntaxLanguageCode: String, CustomStringConvertible, Codable {
        case de
        case en
        case es
        case fr
        case it
        case pt
        public var description: String { return self.rawValue }
    }

    // MARK: Shapes

    public struct AugmentedManifestsListItem: AWSEncodableShape & AWSDecodableShape {
        /// The JSON attribute that contains the annotations for your training documents. The number of attribute names that you specify depends on whether your augmented manifest file is the output of a single labeling job or a chained labeling job. If your file is the output of a single labeling job, specify the LabelAttributeName key that was used when the job was created in Ground Truth. If your file is the output of a chained labeling job, specify the LabelAttributeName key for one or more jobs in the chain. Each LabelAttributeName key provides the annotations from an individual job.
        public let attributeNames: [String]
        /// The Amazon S3 location of the augmented manifest file.
        public let s3Uri: String

        public init(attributeNames: [String], s3Uri: String) {
            self.attributeNames = attributeNames
            self.s3Uri = s3Uri
        }

        public func validate(name: String) throws {
            try self.attributeNames.forEach {
                try validate($0, name: "attributeNames[]", parent: name, max: 63)
                try validate($0, name: "attributeNames[]", parent: name, min: 1)
                try validate($0, name: "attributeNames[]", parent: name, pattern: "^[a-zA-Z0-9](-*[a-zA-Z0-9])*")
            }
            try self.validate(self.s3Uri, name: "s3Uri", parent: name, max: 1024)
            try self.validate(self.s3Uri, name: "s3Uri", parent: name, pattern: "s3://[a-z0-9][\\.\\-a-z0-9]{1,61}[a-z0-9](/.*)?")
        }

        private enum CodingKeys: String, CodingKey {
            case attributeNames = "AttributeNames"
            case s3Uri = "S3Uri"
        }
    }

    public struct BatchDetectDominantLanguageItemResult: AWSDecodableShape {
        /// The zero-based index of the document in the input list.
        public let index: Int?
        /// One or more DominantLanguage objects describing the dominant languages in the document.
        public let languages: [DominantLanguage]?

        public init(index: Int? = nil, languages: [DominantLanguage]? = nil) {
            self.index = index
            self.languages = languages
        }

        private enum CodingKeys: String, CodingKey {
            case index = "Index"
            case languages = "Languages"
        }
    }

    public struct BatchDetectDominantLanguageRequest: AWSEncodableShape {
        /// A list containing the text of the input documents. The list can contain a maximum of 25 documents. Each document should contain at least 20 characters and must contain fewer than 5,000 bytes of UTF-8 encoded characters.
        public let textList: [String]

        public init(textList: [String]) {
            self.textList = textList
        }

        public func validate(name: String) throws {
            try self.textList.forEach {
                try validate($0, name: "textList[]", parent: name, min: 1)
            }
        }

        private enum CodingKeys: String, CodingKey {
            case textList = "TextList"
        }
    }

    public struct BatchDetectDominantLanguageResponse: AWSDecodableShape {
        /// A list containing one object for each document that contained an error. The results are sorted in ascending order by the Index field and match the order of the documents in the input list. If there are no errors in the batch, the ErrorList is empty.
        public let errorList: [BatchItemError]
        /// A list of objects containing the results of the operation. The results are sorted in ascending order by the Index field and match the order of the documents in the input list. If all of the documents contain an error, the ResultList is empty.
        public let resultList: [BatchDetectDominantLanguageItemResult]

        public init(errorList: [BatchItemError], resultList: [BatchDetectDominantLanguageItemResult]) {
            self.errorList = errorList
            self.resultList = resultList
        }

        private enum CodingKeys: String, CodingKey {
            case errorList = "ErrorList"
            case resultList = "ResultList"
        }
    }

    public struct BatchDetectEntitiesItemResult: AWSDecodableShape {
        /// One or more Entity objects, one for each entity detected in the document.
        public let entities: [Entity]?
        /// The zero-based index of the document in the input list.
        public let index: Int?

        public init(entities: [Entity]? = nil, index: Int? = nil) {
            self.entities = entities
            self.index = index
        }

        private enum CodingKeys: String, CodingKey {
            case entities = "Entities"
            case index = "Index"
        }
    }

    public struct BatchDetectEntitiesRequest: AWSEncodableShape {
        /// The language of the input documents. You can specify any of the primary languages supported by Amazon Comprehend. All documents must be in the same language.
        public let languageCode: LanguageCode
        /// A list containing the text of the input documents. The list can contain a maximum of 25 documents. Each document must contain fewer than 5,000 bytes of UTF-8 encoded characters.
        public let textList: [String]

        public init(languageCode: LanguageCode, textList: [String]) {
            self.languageCode = languageCode
            self.textList = textList
        }

        public func validate(name: String) throws {
            try self.textList.forEach {
                try validate($0, name: "textList[]", parent: name, min: 1)
            }
        }

        private enum CodingKeys: String, CodingKey {
            case languageCode = "LanguageCode"
            case textList = "TextList"
        }
    }

    public struct BatchDetectEntitiesResponse: AWSDecodableShape {
        /// A list containing one object for each document that contained an error. The results are sorted in ascending order by the Index field and match the order of the documents in the input list. If there are no errors in the batch, the ErrorList is empty.
        public let errorList: [BatchItemError]
        /// A list of objects containing the results of the operation. The results are sorted in ascending order by the Index field and match the order of the documents in the input list. If all of the documents contain an error, the ResultList is empty.
        public let resultList: [BatchDetectEntitiesItemResult]

        public init(errorList: [BatchItemError], resultList: [BatchDetectEntitiesItemResult]) {
            self.errorList = errorList
            self.resultList = resultList
        }

        private enum CodingKeys: String, CodingKey {
            case errorList = "ErrorList"
            case resultList = "ResultList"
        }
    }

    public struct BatchDetectKeyPhrasesItemResult: AWSDecodableShape {
        /// The zero-based index of the document in the input list.
        public let index: Int?
        /// One or more KeyPhrase objects, one for each key phrase detected in the document.
        public let keyPhrases: [KeyPhrase]?

        public init(index: Int? = nil, keyPhrases: [KeyPhrase]? = nil) {
            self.index = index
            self.keyPhrases = keyPhrases
        }

        private enum CodingKeys: String, CodingKey {
            case index = "Index"
            case keyPhrases = "KeyPhrases"
        }
    }

    public struct BatchDetectKeyPhrasesRequest: AWSEncodableShape {
        /// The language of the input documents. You can specify any of the primary languages supported by Amazon Comprehend. All documents must be in the same language.
        public let languageCode: LanguageCode
        /// A list containing the text of the input documents. The list can contain a maximum of 25 documents. Each document must contain fewer that 5,000 bytes of UTF-8 encoded characters.
        public let textList: [String]

        public init(languageCode: LanguageCode, textList: [String]) {
            self.languageCode = languageCode
            self.textList = textList
        }

        public func validate(name: String) throws {
            try self.textList.forEach {
                try validate($0, name: "textList[]", parent: name, min: 1)
            }
        }

        private enum CodingKeys: String, CodingKey {
            case languageCode = "LanguageCode"
            case textList = "TextList"
        }
    }

    public struct BatchDetectKeyPhrasesResponse: AWSDecodableShape {
        /// A list containing one object for each document that contained an error. The results are sorted in ascending order by the Index field and match the order of the documents in the input list. If there are no errors in the batch, the ErrorList is empty.
        public let errorList: [BatchItemError]
        /// A list of objects containing the results of the operation. The results are sorted in ascending order by the Index field and match the order of the documents in the input list. If all of the documents contain an error, the ResultList is empty.
        public let resultList: [BatchDetectKeyPhrasesItemResult]

        public init(errorList: [BatchItemError], resultList: [BatchDetectKeyPhrasesItemResult]) {
            self.errorList = errorList
            self.resultList = resultList
        }

        private enum CodingKeys: String, CodingKey {
            case errorList = "ErrorList"
            case resultList = "ResultList"
        }
    }

    public struct BatchDetectSentimentItemResult: AWSDecodableShape {
        /// The zero-based index of the document in the input list.
        public let index: Int?
        /// The sentiment detected in the document.
        public let sentiment: SentimentType?
        /// The level of confidence that Amazon Comprehend has in the accuracy of its sentiment detection.
        public let sentimentScore: SentimentScore?

        public init(index: Int? = nil, sentiment: SentimentType? = nil, sentimentScore: SentimentScore? = nil) {
            self.index = index
            self.sentiment = sentiment
            self.sentimentScore = sentimentScore
        }

        private enum CodingKeys: String, CodingKey {
            case index = "Index"
            case sentiment = "Sentiment"
            case sentimentScore = "SentimentScore"
        }
    }

    public struct BatchDetectSentimentRequest: AWSEncodableShape {
        /// The language of the input documents. You can specify any of the primary languages supported by Amazon Comprehend. All documents must be in the same language.
        public let languageCode: LanguageCode
        /// A list containing the text of the input documents. The list can contain a maximum of 25 documents. Each document must contain fewer that 5,000 bytes of UTF-8 encoded characters.
        public let textList: [String]

        public init(languageCode: LanguageCode, textList: [String]) {
            self.languageCode = languageCode
            self.textList = textList
        }

        public func validate(name: String) throws {
            try self.textList.forEach {
                try validate($0, name: "textList[]", parent: name, min: 1)
            }
        }

        private enum CodingKeys: String, CodingKey {
            case languageCode = "LanguageCode"
            case textList = "TextList"
        }
    }

    public struct BatchDetectSentimentResponse: AWSDecodableShape {
        /// A list containing one object for each document that contained an error. The results are sorted in ascending order by the Index field and match the order of the documents in the input list. If there are no errors in the batch, the ErrorList is empty.
        public let errorList: [BatchItemError]
        /// A list of objects containing the results of the operation. The results are sorted in ascending order by the Index field and match the order of the documents in the input list. If all of the documents contain an error, the ResultList is empty.
        public let resultList: [BatchDetectSentimentItemResult]

        public init(errorList: [BatchItemError], resultList: [BatchDetectSentimentItemResult]) {
            self.errorList = errorList
            self.resultList = resultList
        }

        private enum CodingKeys: String, CodingKey {
            case errorList = "ErrorList"
            case resultList = "ResultList"
        }
    }

    public struct BatchDetectSyntaxItemResult: AWSDecodableShape {
        /// The zero-based index of the document in the input list.
        public let index: Int?
        /// The syntax tokens for the words in the document, one token for each word.
        public let syntaxTokens: [SyntaxToken]?

        public init(index: Int? = nil, syntaxTokens: [SyntaxToken]? = nil) {
            self.index = index
            self.syntaxTokens = syntaxTokens
        }

        private enum CodingKeys: String, CodingKey {
            case index = "Index"
            case syntaxTokens = "SyntaxTokens"
        }
    }

    public struct BatchDetectSyntaxRequest: AWSEncodableShape {
        /// The language of the input documents. You can specify any of the following languages supported by Amazon Comprehend: German ("de"), English ("en"), Spanish ("es"), French ("fr"), Italian ("it"), or Portuguese ("pt"). All documents must be in the same language.
        public let languageCode: SyntaxLanguageCode
        /// A list containing the text of the input documents. The list can contain a maximum of 25 documents. Each document must contain fewer that 5,000 bytes of UTF-8 encoded characters.
        public let textList: [String]

        public init(languageCode: SyntaxLanguageCode, textList: [String]) {
            self.languageCode = languageCode
            self.textList = textList
        }

        public func validate(name: String) throws {
            try self.textList.forEach {
                try validate($0, name: "textList[]", parent: name, min: 1)
            }
        }

        private enum CodingKeys: String, CodingKey {
            case languageCode = "LanguageCode"
            case textList = "TextList"
        }
    }

    public struct BatchDetectSyntaxResponse: AWSDecodableShape {
        /// A list containing one object for each document that contained an error. The results are sorted in ascending order by the Index field and match the order of the documents in the input list. If there are no errors in the batch, the ErrorList is empty.
        public let errorList: [BatchItemError]
        /// A list of objects containing the results of the operation. The results are sorted in ascending order by the Index field and match the order of the documents in the input list. If all of the documents contain an error, the ResultList is empty.
        public let resultList: [BatchDetectSyntaxItemResult]

        public init(errorList: [BatchItemError], resultList: [BatchDetectSyntaxItemResult]) {
            self.errorList = errorList
            self.resultList = resultList
        }

        private enum CodingKeys: String, CodingKey {
            case errorList = "ErrorList"
            case resultList = "ResultList"
        }
    }

    public struct BatchItemError: AWSDecodableShape {
        /// The numeric error code of the error.
        public let errorCode: String?
        /// A text description of the error.
        public let errorMessage: String?
        /// The zero-based index of the document in the input list.
        public let index: Int?

        public init(errorCode: String? = nil, errorMessage: String? = nil, index: Int? = nil) {
            self.errorCode = errorCode
            self.errorMessage = errorMessage
            self.index = index
        }

        private enum CodingKeys: String, CodingKey {
            case errorCode = "ErrorCode"
            case errorMessage = "ErrorMessage"
            case index = "Index"
        }
    }

    public struct ClassifierEvaluationMetrics: AWSDecodableShape {
        /// The fraction of the labels that were correct recognized. It is computed by dividing the number of labels in the test documents that were correctly recognized by the total number of labels in the test documents.
        public let accuracy: Double?
        /// A measure of how accurate the classifier results are for the test data. It is derived from the Precision and Recall values. The F1Score is the harmonic average of the two scores. The highest score is 1, and the worst score is 0.
        public let f1Score: Double?
        /// Indicates the fraction of labels that are incorrectly predicted. Also seen as the fraction of wrong labels compared to the total number of labels. Scores closer to zero are better.
        public let hammingLoss: Double?
        /// A measure of how accurate the classifier results are for the test data. It is a combination of the Micro Precision and Micro Recall values. The Micro F1Score is the harmonic mean of the two scores. The highest score is 1, and the worst score is 0.
        public let microF1Score: Double?
        /// A measure of the usefulness of the recognizer results in the test data. High precision means that the recognizer returned substantially more relevant results than irrelevant ones. Unlike the Precision metric which comes from averaging the precision of all available labels, this is based on the overall score of all precision scores added together.
        public let microPrecision: Double?
        /// A measure of how complete the classifier results are for the test data. High recall means that the classifier returned most of the relevant results. Specifically, this indicates how many of the correct categories in the text that the model can predict. It is a percentage of correct categories in the text that can found. Instead of averaging the recall scores of all labels (as with Recall), micro Recall is based on the overall score of all recall scores added together.
        public let microRecall: Double?
        /// A measure of the usefulness of the classifier results in the test data. High precision means that the classifier returned substantially more relevant results than irrelevant ones.
        public let precision: Double?
        /// A measure of how complete the classifier results are for the test data. High recall means that the classifier returned most of the relevant results.
        public let recall: Double?

        public init(accuracy: Double? = nil, f1Score: Double? = nil, hammingLoss: Double? = nil, microF1Score: Double? = nil, microPrecision: Double? = nil, microRecall: Double? = nil, precision: Double? = nil, recall: Double? = nil) {
            self.accuracy = accuracy
            self.f1Score = f1Score
            self.hammingLoss = hammingLoss
            self.microF1Score = microF1Score
            self.microPrecision = microPrecision
            self.microRecall = microRecall
            self.precision = precision
            self.recall = recall
        }

        private enum CodingKeys: String, CodingKey {
            case accuracy = "Accuracy"
            case f1Score = "F1Score"
            case hammingLoss = "HammingLoss"
            case microF1Score = "MicroF1Score"
            case microPrecision = "MicroPrecision"
            case microRecall = "MicroRecall"
            case precision = "Precision"
            case recall = "Recall"
        }
    }

    public struct ClassifierMetadata: AWSDecodableShape {
        ///  Describes the result metrics for the test data associated with an documentation classifier.
        public let evaluationMetrics: ClassifierEvaluationMetrics?
        /// The number of labels in the input data.
        public let numberOfLabels: Int?
        /// The number of documents in the input data that were used to test the classifier. Typically this is 10 to 20 percent of the input documents, up to 10,000 documents.
        public let numberOfTestDocuments: Int?
        /// The number of documents in the input data that were used to train the classifier. Typically this is 80 to 90 percent of the input documents.
        public let numberOfTrainedDocuments: Int?

        public init(evaluationMetrics: ClassifierEvaluationMetrics? = nil, numberOfLabels: Int? = nil, numberOfTestDocuments: Int? = nil, numberOfTrainedDocuments: Int? = nil) {
            self.evaluationMetrics = evaluationMetrics
            self.numberOfLabels = numberOfLabels
            self.numberOfTestDocuments = numberOfTestDocuments
            self.numberOfTrainedDocuments = numberOfTrainedDocuments
        }

        private enum CodingKeys: String, CodingKey {
            case evaluationMetrics = "EvaluationMetrics"
            case numberOfLabels = "NumberOfLabels"
            case numberOfTestDocuments = "NumberOfTestDocuments"
            case numberOfTrainedDocuments = "NumberOfTrainedDocuments"
        }
    }

    public struct ClassifyDocumentRequest: AWSEncodableShape {
        /// The Amazon Resource Number (ARN) of the endpoint.
        public let endpointArn: String
        /// The document text to be analyzed.
        public let text: String

        public init(endpointArn: String, text: String) {
            self.endpointArn = endpointArn
            self.text = text
        }

        public func validate(name: String) throws {
            try self.validate(self.endpointArn, name: "endpointArn", parent: name, max: 256)
            try self.validate(self.endpointArn, name: "endpointArn", parent: name, pattern: "arn:aws(-[^:]+)?:comprehend:[a-zA-Z0-9-]*:[0-9]{12}:document-classifier-endpoint/[a-zA-Z0-9](-*[a-zA-Z0-9])*")
            try self.validate(self.text, name: "text", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case endpointArn = "EndpointArn"
            case text = "Text"
        }
    }

    public struct ClassifyDocumentResponse: AWSDecodableShape {
        /// The classes used by the document being analyzed. These are used for multi-class trained models. Individual classes are mutually exclusive and each document is expected to have only a single class assigned to it. For example, an animal can be a dog or a cat, but not both at the same time.
        public let classes: [DocumentClass]?
        /// The labels used the document being analyzed. These are used for multi-label trained models. Individual labels represent different categories that are related in some manner and are not mutually exclusive. For example, a movie can be just an action movie, or it can be an action movie, a science fiction movie, and a comedy, all at the same time.
        public let labels: [DocumentLabel]?

        public init(classes: [DocumentClass]? = nil, labels: [DocumentLabel]? = nil) {
            self.classes = classes
            self.labels = labels
        }

        private enum CodingKeys: String, CodingKey {
            case classes = "Classes"
            case labels = "Labels"
        }
    }

    public struct CreateDocumentClassifierRequest: AWSEncodableShape {
        /// A unique identifier for the request. If you don't set the client request token, Amazon Comprehend generates one.
        public let clientRequestToken: String?
        /// The Amazon Resource Name (ARN) of the AWS Identity and Management (IAM) role that grants Amazon Comprehend read access to your input data.
        public let dataAccessRoleArn: String
        /// The name of the document classifier.
        public let documentClassifierName: String
        /// Specifies the format and location of the input data for the job.
        public let inputDataConfig: DocumentClassifierInputDataConfig
        /// The language of the input documents. You can specify any of the following languages supported by Amazon Comprehend: German ("de"), English ("en"), Spanish ("es"), French ("fr"), Italian ("it"), or Portuguese ("pt"). All documents must be in the same language.
        public let languageCode: LanguageCode
        /// Indicates the mode in which the classifier will be trained. The classifier can be trained in multi-class mode, which identifies one and only one class for each document, or multi-label mode, which identifies one or more labels for each document. In multi-label mode, multiple labels for an individual document are separated by a delimiter. The default delimiter between labels is a pipe (|).
        public let mode: DocumentClassifierMode?
        /// Enables the addition of output results configuration parameters for custom classifier jobs.
        public let outputDataConfig: DocumentClassifierOutputDataConfig?
        /// Tags to be associated with the document classifier being created. A tag is a key-value pair that adds as a metadata to a resource used by Amazon Comprehend. For example, a tag with "Sales" as the key might be added to a resource to indicate its use by the sales department.
        public let tags: [Tag]?
        /// ID for the AWS Key Management Service (KMS) key that Amazon Comprehend uses to encrypt data on the storage volume attached to the ML compute instance(s) that process the analysis job. The VolumeKmsKeyId can be either of the following formats:   KMS Key ID: "1234abcd-12ab-34cd-56ef-1234567890ab"    Amazon Resource Name (ARN) of a KMS Key: "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab"
        public let volumeKmsKeyId: String?
        /// Configuration parameters for an optional private Virtual Private Cloud (VPC) containing the resources you are using for your custom classifier. For more information, see Amazon VPC.
        public let vpcConfig: VpcConfig?

        public init(clientRequestToken: String? = CreateDocumentClassifierRequest.idempotencyToken(), dataAccessRoleArn: String, documentClassifierName: String, inputDataConfig: DocumentClassifierInputDataConfig, languageCode: LanguageCode, mode: DocumentClassifierMode? = nil, outputDataConfig: DocumentClassifierOutputDataConfig? = nil, tags: [Tag]? = nil, volumeKmsKeyId: String? = nil, vpcConfig: VpcConfig? = nil) {
            self.clientRequestToken = clientRequestToken
            self.dataAccessRoleArn = dataAccessRoleArn
            self.documentClassifierName = documentClassifierName
            self.inputDataConfig = inputDataConfig
            self.languageCode = languageCode
            self.mode = mode
            self.outputDataConfig = outputDataConfig
            self.tags = tags
            self.volumeKmsKeyId = volumeKmsKeyId
            self.vpcConfig = vpcConfig
        }

        public func validate(name: String) throws {
            try self.validate(self.clientRequestToken, name: "clientRequestToken", parent: name, max: 64)
            try self.validate(self.clientRequestToken, name: "clientRequestToken", parent: name, min: 1)
            try self.validate(self.clientRequestToken, name: "clientRequestToken", parent: name, pattern: "^[a-zA-Z0-9-]+$")
            try self.validate(self.dataAccessRoleArn, name: "dataAccessRoleArn", parent: name, max: 2048)
            try self.validate(self.dataAccessRoleArn, name: "dataAccessRoleArn", parent: name, min: 20)
            try self.validate(self.dataAccessRoleArn, name: "dataAccessRoleArn", parent: name, pattern: "arn:aws(-[^:]+)?:iam::[0-9]{12}:role/.+")
            try self.validate(self.documentClassifierName, name: "documentClassifierName", parent: name, max: 63)
            try self.validate(self.documentClassifierName, name: "documentClassifierName", parent: name, pattern: "^[a-zA-Z0-9](-*[a-zA-Z0-9])*$")
            try self.inputDataConfig.validate(name: "\(name).inputDataConfig")
            try self.outputDataConfig?.validate(name: "\(name).outputDataConfig")
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
            try self.validate(self.volumeKmsKeyId, name: "volumeKmsKeyId", parent: name, max: 2048)
            try self.vpcConfig?.validate(name: "\(name).vpcConfig")
        }

        private enum CodingKeys: String, CodingKey {
            case clientRequestToken = "ClientRequestToken"
            case dataAccessRoleArn = "DataAccessRoleArn"
            case documentClassifierName = "DocumentClassifierName"
            case inputDataConfig = "InputDataConfig"
            case languageCode = "LanguageCode"
            case mode = "Mode"
            case outputDataConfig = "OutputDataConfig"
            case tags = "Tags"
            case volumeKmsKeyId = "VolumeKmsKeyId"
            case vpcConfig = "VpcConfig"
        }
    }

    public struct CreateDocumentClassifierResponse: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) that identifies the document classifier.
        public let documentClassifierArn: String?

        public init(documentClassifierArn: String? = nil) {
            self.documentClassifierArn = documentClassifierArn
        }

        private enum CodingKeys: String, CodingKey {
            case documentClassifierArn = "DocumentClassifierArn"
        }
    }

    public struct CreateEndpointRequest: AWSEncodableShape {
        /// An idempotency token provided by the customer. If this token matches a previous endpoint creation request, Amazon Comprehend will not return a ResourceInUseException.
        public let clientRequestToken: String?
        ///  The desired number of inference units to be used by the model using this endpoint. Each inference unit represents of a throughput of 100 characters per second.
        public let desiredInferenceUnits: Int
        /// This is the descriptive suffix that becomes part of the EndpointArn used for all subsequent requests to this resource.
        public let endpointName: String
        /// The Amazon Resource Number (ARN) of the model to which the endpoint will be attached.
        public let modelArn: String
        /// Tags associated with the endpoint being created. A tag is a key-value pair that adds metadata to the endpoint. For example, a tag with "Sales" as the key might be added to an endpoint to indicate its use by the sales department.
        public let tags: [Tag]?

        public init(clientRequestToken: String? = CreateEndpointRequest.idempotencyToken(), desiredInferenceUnits: Int, endpointName: String, modelArn: String, tags: [Tag]? = nil) {
            self.clientRequestToken = clientRequestToken
            self.desiredInferenceUnits = desiredInferenceUnits
            self.endpointName = endpointName
            self.modelArn = modelArn
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.validate(self.clientRequestToken, name: "clientRequestToken", parent: name, max: 64)
            try self.validate(self.clientRequestToken, name: "clientRequestToken", parent: name, min: 1)
            try self.validate(self.clientRequestToken, name: "clientRequestToken", parent: name, pattern: "^[a-zA-Z0-9-]+$")
            try self.validate(self.desiredInferenceUnits, name: "desiredInferenceUnits", parent: name, min: 1)
            try self.validate(self.endpointName, name: "endpointName", parent: name, max: 40)
            try self.validate(self.endpointName, name: "endpointName", parent: name, pattern: "^[a-zA-Z0-9](-*[a-zA-Z0-9])*$")
            try self.validate(self.modelArn, name: "modelArn", parent: name, max: 256)
            try self.validate(self.modelArn, name: "modelArn", parent: name, pattern: "arn:aws(-[^:]+)?:comprehend:[a-zA-Z0-9-]*:[0-9]{12}:(document-classifier|entity-recognizer)/[a-zA-Z0-9](-*[a-zA-Z0-9])*")
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case clientRequestToken = "ClientRequestToken"
            case desiredInferenceUnits = "DesiredInferenceUnits"
            case endpointName = "EndpointName"
            case modelArn = "ModelArn"
            case tags = "Tags"
        }
    }

    public struct CreateEndpointResponse: AWSDecodableShape {
        /// The Amazon Resource Number (ARN) of the endpoint being created.
        public let endpointArn: String?

        public init(endpointArn: String? = nil) {
            self.endpointArn = endpointArn
        }

        private enum CodingKeys: String, CodingKey {
            case endpointArn = "EndpointArn"
        }
    }

    public struct CreateEntityRecognizerRequest: AWSEncodableShape {
        ///  A unique identifier for the request. If you don't set the client request token, Amazon Comprehend generates one.
        public let clientRequestToken: String?
        /// The Amazon Resource Name (ARN) of the AWS Identity and Management (IAM) role that grants Amazon Comprehend read access to your input data.
        public let dataAccessRoleArn: String
        /// Specifies the format and location of the input data. The S3 bucket containing the input data must be located in the same region as the entity recognizer being created.
        public let inputDataConfig: EntityRecognizerInputDataConfig
        ///  You can specify any of the following languages supported by Amazon Comprehend: English ("en"), Spanish ("es"), French ("fr"), Italian ("it"), German ("de"), or Portuguese ("pt"). All documents must be in the same language.
        public let languageCode: LanguageCode
        /// The name given to the newly created recognizer. Recognizer names can be a maximum of 256 characters. Alphanumeric characters, hyphens (-) and underscores (_) are allowed. The name must be unique in the account/region.
        public let recognizerName: String
        /// Tags to be associated with the entity recognizer being created. A tag is a key-value pair that adds as a metadata to a resource used by Amazon Comprehend. For example, a tag with "Sales" as the key might be added to a resource to indicate its use by the sales department.
        public let tags: [Tag]?
        /// ID for the AWS Key Management Service (KMS) key that Amazon Comprehend uses to encrypt data on the storage volume attached to the ML compute instance(s) that process the analysis job. The VolumeKmsKeyId can be either of the following formats:   KMS Key ID: "1234abcd-12ab-34cd-56ef-1234567890ab"    Amazon Resource Name (ARN) of a KMS Key: "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab"
        public let volumeKmsKeyId: String?
        /// Configuration parameters for an optional private Virtual Private Cloud (VPC) containing the resources you are using for your custom entity recognizer. For more information, see Amazon VPC.
        public let vpcConfig: VpcConfig?

        public init(clientRequestToken: String? = CreateEntityRecognizerRequest.idempotencyToken(), dataAccessRoleArn: String, inputDataConfig: EntityRecognizerInputDataConfig, languageCode: LanguageCode, recognizerName: String, tags: [Tag]? = nil, volumeKmsKeyId: String? = nil, vpcConfig: VpcConfig? = nil) {
            self.clientRequestToken = clientRequestToken
            self.dataAccessRoleArn = dataAccessRoleArn
            self.inputDataConfig = inputDataConfig
            self.languageCode = languageCode
            self.recognizerName = recognizerName
            self.tags = tags
            self.volumeKmsKeyId = volumeKmsKeyId
            self.vpcConfig = vpcConfig
        }

        public func validate(name: String) throws {
            try self.validate(self.clientRequestToken, name: "clientRequestToken", parent: name, max: 64)
            try self.validate(self.clientRequestToken, name: "clientRequestToken", parent: name, min: 1)
            try self.validate(self.clientRequestToken, name: "clientRequestToken", parent: name, pattern: "^[a-zA-Z0-9-]+$")
            try self.validate(self.dataAccessRoleArn, name: "dataAccessRoleArn", parent: name, max: 2048)
            try self.validate(self.dataAccessRoleArn, name: "dataAccessRoleArn", parent: name, min: 20)
            try self.validate(self.dataAccessRoleArn, name: "dataAccessRoleArn", parent: name, pattern: "arn:aws(-[^:]+)?:iam::[0-9]{12}:role/.+")
            try self.inputDataConfig.validate(name: "\(name).inputDataConfig")
            try self.validate(self.recognizerName, name: "recognizerName", parent: name, max: 63)
            try self.validate(self.recognizerName, name: "recognizerName", parent: name, pattern: "^[a-zA-Z0-9](-*[a-zA-Z0-9])*$")
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
            try self.validate(self.volumeKmsKeyId, name: "volumeKmsKeyId", parent: name, max: 2048)
            try self.vpcConfig?.validate(name: "\(name).vpcConfig")
        }

        private enum CodingKeys: String, CodingKey {
            case clientRequestToken = "ClientRequestToken"
            case dataAccessRoleArn = "DataAccessRoleArn"
            case inputDataConfig = "InputDataConfig"
            case languageCode = "LanguageCode"
            case recognizerName = "RecognizerName"
            case tags = "Tags"
            case volumeKmsKeyId = "VolumeKmsKeyId"
            case vpcConfig = "VpcConfig"
        }
    }

    public struct CreateEntityRecognizerResponse: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) that identifies the entity recognizer.
        public let entityRecognizerArn: String?

        public init(entityRecognizerArn: String? = nil) {
            self.entityRecognizerArn = entityRecognizerArn
        }

        private enum CodingKeys: String, CodingKey {
            case entityRecognizerArn = "EntityRecognizerArn"
        }
    }

    public struct DeleteDocumentClassifierRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) that identifies the document classifier.
        public let documentClassifierArn: String

        public init(documentClassifierArn: String) {
            self.documentClassifierArn = documentClassifierArn
        }

        public func validate(name: String) throws {
            try self.validate(self.documentClassifierArn, name: "documentClassifierArn", parent: name, max: 256)
            try self.validate(self.documentClassifierArn, name: "documentClassifierArn", parent: name, pattern: "arn:aws(-[^:]+)?:comprehend:[a-zA-Z0-9-]*:[0-9]{12}:document-classifier/[a-zA-Z0-9](-*[a-zA-Z0-9])*")
        }

        private enum CodingKeys: String, CodingKey {
            case documentClassifierArn = "DocumentClassifierArn"
        }
    }

    public struct DeleteDocumentClassifierResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DeleteEndpointRequest: AWSEncodableShape {
        /// The Amazon Resource Number (ARN) of the endpoint being deleted.
        public let endpointArn: String

        public init(endpointArn: String) {
            self.endpointArn = endpointArn
        }

        public func validate(name: String) throws {
            try self.validate(self.endpointArn, name: "endpointArn", parent: name, max: 256)
            try self.validate(self.endpointArn, name: "endpointArn", parent: name, pattern: "arn:aws(-[^:]+)?:comprehend:[a-zA-Z0-9-]*:[0-9]{12}:(document-classifier-endpoint|entity-recognizer-endpoint)/[a-zA-Z0-9](-*[a-zA-Z0-9])*")
        }

        private enum CodingKeys: String, CodingKey {
            case endpointArn = "EndpointArn"
        }
    }

    public struct DeleteEndpointResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DeleteEntityRecognizerRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) that identifies the entity recognizer.
        public let entityRecognizerArn: String

        public init(entityRecognizerArn: String) {
            self.entityRecognizerArn = entityRecognizerArn
        }

        public func validate(name: String) throws {
            try self.validate(self.entityRecognizerArn, name: "entityRecognizerArn", parent: name, max: 256)
            try self.validate(self.entityRecognizerArn, name: "entityRecognizerArn", parent: name, pattern: "arn:aws(-[^:]+)?:comprehend:[a-zA-Z0-9-]*:[0-9]{12}:entity-recognizer/[a-zA-Z0-9](-*[a-zA-Z0-9])*")
        }

        private enum CodingKeys: String, CodingKey {
            case entityRecognizerArn = "EntityRecognizerArn"
        }
    }

    public struct DeleteEntityRecognizerResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DescribeDocumentClassificationJobRequest: AWSEncodableShape {
        /// The identifier that Amazon Comprehend generated for the job. The operation returns this identifier in its response.
        public let jobId: String

        public init(jobId: String) {
            self.jobId = jobId
        }

        public func validate(name: String) throws {
            try self.validate(self.jobId, name: "jobId", parent: name, max: 32)
            try self.validate(self.jobId, name: "jobId", parent: name, min: 1)
            try self.validate(self.jobId, name: "jobId", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-%@]*)$")
        }

        private enum CodingKeys: String, CodingKey {
            case jobId = "JobId"
        }
    }

    public struct DescribeDocumentClassificationJobResponse: AWSDecodableShape {
        /// An object that describes the properties associated with the document classification job.
        public let documentClassificationJobProperties: DocumentClassificationJobProperties?

        public init(documentClassificationJobProperties: DocumentClassificationJobProperties? = nil) {
            self.documentClassificationJobProperties = documentClassificationJobProperties
        }

        private enum CodingKeys: String, CodingKey {
            case documentClassificationJobProperties = "DocumentClassificationJobProperties"
        }
    }

    public struct DescribeDocumentClassifierRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) that identifies the document classifier. The operation returns this identifier in its response.
        public let documentClassifierArn: String

        public init(documentClassifierArn: String) {
            self.documentClassifierArn = documentClassifierArn
        }

        public func validate(name: String) throws {
            try self.validate(self.documentClassifierArn, name: "documentClassifierArn", parent: name, max: 256)
            try self.validate(self.documentClassifierArn, name: "documentClassifierArn", parent: name, pattern: "arn:aws(-[^:]+)?:comprehend:[a-zA-Z0-9-]*:[0-9]{12}:document-classifier/[a-zA-Z0-9](-*[a-zA-Z0-9])*")
        }

        private enum CodingKeys: String, CodingKey {
            case documentClassifierArn = "DocumentClassifierArn"
        }
    }

    public struct DescribeDocumentClassifierResponse: AWSDecodableShape {
        /// An object that contains the properties associated with a document classifier.
        public let documentClassifierProperties: DocumentClassifierProperties?

        public init(documentClassifierProperties: DocumentClassifierProperties? = nil) {
            self.documentClassifierProperties = documentClassifierProperties
        }

        private enum CodingKeys: String, CodingKey {
            case documentClassifierProperties = "DocumentClassifierProperties"
        }
    }

    public struct DescribeDominantLanguageDetectionJobRequest: AWSEncodableShape {
        /// The identifier that Amazon Comprehend generated for the job. The operation returns this identifier in its response.
        public let jobId: String

        public init(jobId: String) {
            self.jobId = jobId
        }

        public func validate(name: String) throws {
            try self.validate(self.jobId, name: "jobId", parent: name, max: 32)
            try self.validate(self.jobId, name: "jobId", parent: name, min: 1)
            try self.validate(self.jobId, name: "jobId", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-%@]*)$")
        }

        private enum CodingKeys: String, CodingKey {
            case jobId = "JobId"
        }
    }

    public struct DescribeDominantLanguageDetectionJobResponse: AWSDecodableShape {
        /// An object that contains the properties associated with a dominant language detection job.
        public let dominantLanguageDetectionJobProperties: DominantLanguageDetectionJobProperties?

        public init(dominantLanguageDetectionJobProperties: DominantLanguageDetectionJobProperties? = nil) {
            self.dominantLanguageDetectionJobProperties = dominantLanguageDetectionJobProperties
        }

        private enum CodingKeys: String, CodingKey {
            case dominantLanguageDetectionJobProperties = "DominantLanguageDetectionJobProperties"
        }
    }

    public struct DescribeEndpointRequest: AWSEncodableShape {
        /// The Amazon Resource Number (ARN) of the endpoint being described.
        public let endpointArn: String

        public init(endpointArn: String) {
            self.endpointArn = endpointArn
        }

        public func validate(name: String) throws {
            try self.validate(self.endpointArn, name: "endpointArn", parent: name, max: 256)
            try self.validate(self.endpointArn, name: "endpointArn", parent: name, pattern: "arn:aws(-[^:]+)?:comprehend:[a-zA-Z0-9-]*:[0-9]{12}:(document-classifier-endpoint|entity-recognizer-endpoint)/[a-zA-Z0-9](-*[a-zA-Z0-9])*")
        }

        private enum CodingKeys: String, CodingKey {
            case endpointArn = "EndpointArn"
        }
    }

    public struct DescribeEndpointResponse: AWSDecodableShape {
        /// Describes information associated with the specific endpoint.
        public let endpointProperties: EndpointProperties?

        public init(endpointProperties: EndpointProperties? = nil) {
            self.endpointProperties = endpointProperties
        }

        private enum CodingKeys: String, CodingKey {
            case endpointProperties = "EndpointProperties"
        }
    }

    public struct DescribeEntitiesDetectionJobRequest: AWSEncodableShape {
        /// The identifier that Amazon Comprehend generated for the job. The operation returns this identifier in its response.
        public let jobId: String

        public init(jobId: String) {
            self.jobId = jobId
        }

        public func validate(name: String) throws {
            try self.validate(self.jobId, name: "jobId", parent: name, max: 32)
            try self.validate(self.jobId, name: "jobId", parent: name, min: 1)
            try self.validate(self.jobId, name: "jobId", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-%@]*)$")
        }

        private enum CodingKeys: String, CodingKey {
            case jobId = "JobId"
        }
    }

    public struct DescribeEntitiesDetectionJobResponse: AWSDecodableShape {
        /// An object that contains the properties associated with an entities detection job.
        public let entitiesDetectionJobProperties: EntitiesDetectionJobProperties?

        public init(entitiesDetectionJobProperties: EntitiesDetectionJobProperties? = nil) {
            self.entitiesDetectionJobProperties = entitiesDetectionJobProperties
        }

        private enum CodingKeys: String, CodingKey {
            case entitiesDetectionJobProperties = "EntitiesDetectionJobProperties"
        }
    }

    public struct DescribeEntityRecognizerRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) that identifies the entity recognizer.
        public let entityRecognizerArn: String

        public init(entityRecognizerArn: String) {
            self.entityRecognizerArn = entityRecognizerArn
        }

        public func validate(name: String) throws {
            try self.validate(self.entityRecognizerArn, name: "entityRecognizerArn", parent: name, max: 256)
            try self.validate(self.entityRecognizerArn, name: "entityRecognizerArn", parent: name, pattern: "arn:aws(-[^:]+)?:comprehend:[a-zA-Z0-9-]*:[0-9]{12}:entity-recognizer/[a-zA-Z0-9](-*[a-zA-Z0-9])*")
        }

        private enum CodingKeys: String, CodingKey {
            case entityRecognizerArn = "EntityRecognizerArn"
        }
    }

    public struct DescribeEntityRecognizerResponse: AWSDecodableShape {
        /// Describes information associated with an entity recognizer.
        public let entityRecognizerProperties: EntityRecognizerProperties?

        public init(entityRecognizerProperties: EntityRecognizerProperties? = nil) {
            self.entityRecognizerProperties = entityRecognizerProperties
        }

        private enum CodingKeys: String, CodingKey {
            case entityRecognizerProperties = "EntityRecognizerProperties"
        }
    }

    public struct DescribeEventsDetectionJobRequest: AWSEncodableShape {
        /// The identifier of the events detection job.
        public let jobId: String

        public init(jobId: String) {
            self.jobId = jobId
        }

        public func validate(name: String) throws {
            try self.validate(self.jobId, name: "jobId", parent: name, max: 32)
            try self.validate(self.jobId, name: "jobId", parent: name, min: 1)
            try self.validate(self.jobId, name: "jobId", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-%@]*)$")
        }

        private enum CodingKeys: String, CodingKey {
            case jobId = "JobId"
        }
    }

    public struct DescribeEventsDetectionJobResponse: AWSDecodableShape {
        /// An object that contains the properties associated with an event detection job.
        public let eventsDetectionJobProperties: EventsDetectionJobProperties?

        public init(eventsDetectionJobProperties: EventsDetectionJobProperties? = nil) {
            self.eventsDetectionJobProperties = eventsDetectionJobProperties
        }

        private enum CodingKeys: String, CodingKey {
            case eventsDetectionJobProperties = "EventsDetectionJobProperties"
        }
    }

    public struct DescribeKeyPhrasesDetectionJobRequest: AWSEncodableShape {
        /// The identifier that Amazon Comprehend generated for the job. The operation returns this identifier in its response.
        public let jobId: String

        public init(jobId: String) {
            self.jobId = jobId
        }

        public func validate(name: String) throws {
            try self.validate(self.jobId, name: "jobId", parent: name, max: 32)
            try self.validate(self.jobId, name: "jobId", parent: name, min: 1)
            try self.validate(self.jobId, name: "jobId", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-%@]*)$")
        }

        private enum CodingKeys: String, CodingKey {
            case jobId = "JobId"
        }
    }

    public struct DescribeKeyPhrasesDetectionJobResponse: AWSDecodableShape {
        /// An object that contains the properties associated with a key phrases detection job.
        public let keyPhrasesDetectionJobProperties: KeyPhrasesDetectionJobProperties?

        public init(keyPhrasesDetectionJobProperties: KeyPhrasesDetectionJobProperties? = nil) {
            self.keyPhrasesDetectionJobProperties = keyPhrasesDetectionJobProperties
        }

        private enum CodingKeys: String, CodingKey {
            case keyPhrasesDetectionJobProperties = "KeyPhrasesDetectionJobProperties"
        }
    }

    public struct DescribePiiEntitiesDetectionJobRequest: AWSEncodableShape {
        /// The identifier that Amazon Comprehend generated for the job. The operation returns this identifier in its response.
        public let jobId: String

        public init(jobId: String) {
            self.jobId = jobId
        }

        public func validate(name: String) throws {
            try self.validate(self.jobId, name: "jobId", parent: name, max: 32)
            try self.validate(self.jobId, name: "jobId", parent: name, min: 1)
            try self.validate(self.jobId, name: "jobId", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-%@]*)$")
        }

        private enum CodingKeys: String, CodingKey {
            case jobId = "JobId"
        }
    }

    public struct DescribePiiEntitiesDetectionJobResponse: AWSDecodableShape {
        public let piiEntitiesDetectionJobProperties: PiiEntitiesDetectionJobProperties?

        public init(piiEntitiesDetectionJobProperties: PiiEntitiesDetectionJobProperties? = nil) {
            self.piiEntitiesDetectionJobProperties = piiEntitiesDetectionJobProperties
        }

        private enum CodingKeys: String, CodingKey {
            case piiEntitiesDetectionJobProperties = "PiiEntitiesDetectionJobProperties"
        }
    }

    public struct DescribeSentimentDetectionJobRequest: AWSEncodableShape {
        /// The identifier that Amazon Comprehend generated for the job. The operation returns this identifier in its response.
        public let jobId: String

        public init(jobId: String) {
            self.jobId = jobId
        }

        public func validate(name: String) throws {
            try self.validate(self.jobId, name: "jobId", parent: name, max: 32)
            try self.validate(self.jobId, name: "jobId", parent: name, min: 1)
            try self.validate(self.jobId, name: "jobId", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-%@]*)$")
        }

        private enum CodingKeys: String, CodingKey {
            case jobId = "JobId"
        }
    }

    public struct DescribeSentimentDetectionJobResponse: AWSDecodableShape {
        /// An object that contains the properties associated with a sentiment detection job.
        public let sentimentDetectionJobProperties: SentimentDetectionJobProperties?

        public init(sentimentDetectionJobProperties: SentimentDetectionJobProperties? = nil) {
            self.sentimentDetectionJobProperties = sentimentDetectionJobProperties
        }

        private enum CodingKeys: String, CodingKey {
            case sentimentDetectionJobProperties = "SentimentDetectionJobProperties"
        }
    }

    public struct DescribeTopicsDetectionJobRequest: AWSEncodableShape {
        /// The identifier assigned by the user to the detection job.
        public let jobId: String

        public init(jobId: String) {
            self.jobId = jobId
        }

        public func validate(name: String) throws {
            try self.validate(self.jobId, name: "jobId", parent: name, max: 32)
            try self.validate(self.jobId, name: "jobId", parent: name, min: 1)
            try self.validate(self.jobId, name: "jobId", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-%@]*)$")
        }

        private enum CodingKeys: String, CodingKey {
            case jobId = "JobId"
        }
    }

    public struct DescribeTopicsDetectionJobResponse: AWSDecodableShape {
        /// The list of properties for the requested job.
        public let topicsDetectionJobProperties: TopicsDetectionJobProperties?

        public init(topicsDetectionJobProperties: TopicsDetectionJobProperties? = nil) {
            self.topicsDetectionJobProperties = topicsDetectionJobProperties
        }

        private enum CodingKeys: String, CodingKey {
            case topicsDetectionJobProperties = "TopicsDetectionJobProperties"
        }
    }

    public struct DetectDominantLanguageRequest: AWSEncodableShape {
        /// A UTF-8 text string. Each string should contain at least 20 characters and must contain fewer that 5,000 bytes of UTF-8 encoded characters.
        public let text: String

        public init(text: String) {
            self.text = text
        }

        public func validate(name: String) throws {
            try self.validate(self.text, name: "text", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case text = "Text"
        }
    }

    public struct DetectDominantLanguageResponse: AWSDecodableShape {
        /// The languages that Amazon Comprehend detected in the input text. For each language, the response returns the RFC 5646 language code and the level of confidence that Amazon Comprehend has in the accuracy of its inference. For more information about RFC 5646, see Tags for Identifying Languages on the IETF Tools web site.
        public let languages: [DominantLanguage]?

        public init(languages: [DominantLanguage]? = nil) {
            self.languages = languages
        }

        private enum CodingKeys: String, CodingKey {
            case languages = "Languages"
        }
    }

    public struct DetectEntitiesRequest: AWSEncodableShape {
        /// The Amazon Resource Name of an endpoint that is associated with a custom entity recognition model. Provide an endpoint if you want to detect entities by using your own custom model instead of the default model that is used by Amazon Comprehend. If you specify an endpoint, Amazon Comprehend uses the language of your custom model, and it ignores any language code that you provide in your request.
        public let endpointArn: String?
        /// The language of the input documents. You can specify any of the primary languages supported by Amazon Comprehend. All documents must be in the same language. If your request includes the endpoint for a custom entity recognition model, Amazon Comprehend uses the language of your custom model, and it ignores any language code that you specify here.
        public let languageCode: LanguageCode?
        /// A UTF-8 text string. Each string must contain fewer that 5,000 bytes of UTF-8 encoded characters.
        public let text: String

        public init(endpointArn: String? = nil, languageCode: LanguageCode? = nil, text: String) {
            self.endpointArn = endpointArn
            self.languageCode = languageCode
            self.text = text
        }

        public func validate(name: String) throws {
            try self.validate(self.endpointArn, name: "endpointArn", parent: name, max: 256)
            try self.validate(self.endpointArn, name: "endpointArn", parent: name, pattern: "arn:aws(-[^:]+)?:comprehend:[a-zA-Z0-9-]*:[0-9]{12}:entity-recognizer-endpoint/[a-zA-Z0-9](-*[a-zA-Z0-9])*")
            try self.validate(self.text, name: "text", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case endpointArn = "EndpointArn"
            case languageCode = "LanguageCode"
            case text = "Text"
        }
    }

    public struct DetectEntitiesResponse: AWSDecodableShape {
        /// A collection of entities identified in the input text. For each entity, the response provides the entity text, entity type, where the entity text begins and ends, and the level of confidence that Amazon Comprehend has in the detection.  If your request uses a custom entity recognition model, Amazon Comprehend detects the entities that the model is trained to recognize. Otherwise, it detects the default entity types. For a list of default entity types, see how-entities.
        public let entities: [Entity]?

        public init(entities: [Entity]? = nil) {
            self.entities = entities
        }

        private enum CodingKeys: String, CodingKey {
            case entities = "Entities"
        }
    }

    public struct DetectKeyPhrasesRequest: AWSEncodableShape {
        /// The language of the input documents. You can specify any of the primary languages supported by Amazon Comprehend. All documents must be in the same language.
        public let languageCode: LanguageCode
        /// A UTF-8 text string. Each string must contain fewer that 5,000 bytes of UTF-8 encoded characters.
        public let text: String

        public init(languageCode: LanguageCode, text: String) {
            self.languageCode = languageCode
            self.text = text
        }

        public func validate(name: String) throws {
            try self.validate(self.text, name: "text", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case languageCode = "LanguageCode"
            case text = "Text"
        }
    }

    public struct DetectKeyPhrasesResponse: AWSDecodableShape {
        /// A collection of key phrases that Amazon Comprehend identified in the input text. For each key phrase, the response provides the text of the key phrase, where the key phrase begins and ends, and the level of confidence that Amazon Comprehend has in the accuracy of the detection.
        public let keyPhrases: [KeyPhrase]?

        public init(keyPhrases: [KeyPhrase]? = nil) {
            self.keyPhrases = keyPhrases
        }

        private enum CodingKeys: String, CodingKey {
            case keyPhrases = "KeyPhrases"
        }
    }

    public struct DetectPiiEntitiesRequest: AWSEncodableShape {
        /// The language of the input documents.
        public let languageCode: LanguageCode
        /// A UTF-8 text string. Each string must contain fewer that 5,000 bytes of UTF-8 encoded characters.
        public let text: String

        public init(languageCode: LanguageCode, text: String) {
            self.languageCode = languageCode
            self.text = text
        }

        public func validate(name: String) throws {
            try self.validate(self.text, name: "text", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case languageCode = "LanguageCode"
            case text = "Text"
        }
    }

    public struct DetectPiiEntitiesResponse: AWSDecodableShape {
        /// A collection of PII entities identified in the input text. For each entity, the response provides the entity type, where the entity text begins and ends, and the level of confidence that Amazon Comprehend has in the detection.
        public let entities: [PiiEntity]?

        public init(entities: [PiiEntity]? = nil) {
            self.entities = entities
        }

        private enum CodingKeys: String, CodingKey {
            case entities = "Entities"
        }
    }

    public struct DetectSentimentRequest: AWSEncodableShape {
        /// The language of the input documents. You can specify any of the primary languages supported by Amazon Comprehend. All documents must be in the same language.
        public let languageCode: LanguageCode
        /// A UTF-8 text string. Each string must contain fewer that 5,000 bytes of UTF-8 encoded characters.
        public let text: String

        public init(languageCode: LanguageCode, text: String) {
            self.languageCode = languageCode
            self.text = text
        }

        public func validate(name: String) throws {
            try self.validate(self.text, name: "text", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case languageCode = "LanguageCode"
            case text = "Text"
        }
    }

    public struct DetectSentimentResponse: AWSDecodableShape {
        /// The inferred sentiment that Amazon Comprehend has the highest level of confidence in.
        public let sentiment: SentimentType?
        /// An object that lists the sentiments, and their corresponding confidence levels.
        public let sentimentScore: SentimentScore?

        public init(sentiment: SentimentType? = nil, sentimentScore: SentimentScore? = nil) {
            self.sentiment = sentiment
            self.sentimentScore = sentimentScore
        }

        private enum CodingKeys: String, CodingKey {
            case sentiment = "Sentiment"
            case sentimentScore = "SentimentScore"
        }
    }

    public struct DetectSyntaxRequest: AWSEncodableShape {
        /// The language code of the input documents. You can specify any of the following languages supported by Amazon Comprehend: German ("de"), English ("en"), Spanish ("es"), French ("fr"), Italian ("it"), or Portuguese ("pt").
        public let languageCode: SyntaxLanguageCode
        /// A UTF-8 string. Each string must contain fewer that 5,000 bytes of UTF encoded characters.
        public let text: String

        public init(languageCode: SyntaxLanguageCode, text: String) {
            self.languageCode = languageCode
            self.text = text
        }

        public func validate(name: String) throws {
            try self.validate(self.text, name: "text", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case languageCode = "LanguageCode"
            case text = "Text"
        }
    }

    public struct DetectSyntaxResponse: AWSDecodableShape {
        /// A collection of syntax tokens describing the text. For each token, the response provides the text, the token type, where the text begins and ends, and the level of confidence that Amazon Comprehend has that the token is correct. For a list of token types, see how-syntax.
        public let syntaxTokens: [SyntaxToken]?

        public init(syntaxTokens: [SyntaxToken]? = nil) {
            self.syntaxTokens = syntaxTokens
        }

        private enum CodingKeys: String, CodingKey {
            case syntaxTokens = "SyntaxTokens"
        }
    }

    public struct DocumentClass: AWSDecodableShape {
        /// The name of the class.
        public let name: String?
        /// The confidence score that Amazon Comprehend has this class correctly attributed.
        public let score: Float?

        public init(name: String? = nil, score: Float? = nil) {
            self.name = name
            self.score = score
        }

        private enum CodingKeys: String, CodingKey {
            case name = "Name"
            case score = "Score"
        }
    }

    public struct DocumentClassificationJobFilter: AWSEncodableShape {
        /// Filters on the name of the job.
        public let jobName: String?
        /// Filters the list based on job status. Returns only jobs with the specified status.
        public let jobStatus: JobStatus?
        /// Filters the list of jobs based on the time that the job was submitted for processing. Returns only jobs submitted after the specified time. Jobs are returned in descending order, newest to oldest.
        public let submitTimeAfter: Date?
        /// Filters the list of jobs based on the time that the job was submitted for processing. Returns only jobs submitted before the specified time. Jobs are returned in ascending order, oldest to newest.
        public let submitTimeBefore: Date?

        public init(jobName: String? = nil, jobStatus: JobStatus? = nil, submitTimeAfter: Date? = nil, submitTimeBefore: Date? = nil) {
            self.jobName = jobName
            self.jobStatus = jobStatus
            self.submitTimeAfter = submitTimeAfter
            self.submitTimeBefore = submitTimeBefore
        }

        public func validate(name: String) throws {
            try self.validate(self.jobName, name: "jobName", parent: name, max: 256)
            try self.validate(self.jobName, name: "jobName", parent: name, min: 1)
            try self.validate(self.jobName, name: "jobName", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-%@]*)$")
        }

        private enum CodingKeys: String, CodingKey {
            case jobName = "JobName"
            case jobStatus = "JobStatus"
            case submitTimeAfter = "SubmitTimeAfter"
            case submitTimeBefore = "SubmitTimeBefore"
        }
    }

    public struct DocumentClassificationJobProperties: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the AWS identity and Access Management (IAM) role that grants Amazon Comprehend read access to your input data.
        public let dataAccessRoleArn: String?
        /// The Amazon Resource Name (ARN) that identifies the document classifier.
        public let documentClassifierArn: String?
        /// The time that the document classification job completed.
        public let endTime: Date?
        /// The input data configuration that you supplied when you created the document classification job.
        public let inputDataConfig: InputDataConfig?
        /// The identifier assigned to the document classification job.
        public let jobId: String?
        /// The name that you assigned to the document classification job.
        public let jobName: String?
        /// The current status of the document classification job. If the status is FAILED, the Message field shows the reason for the failure.
        public let jobStatus: JobStatus?
        /// A description of the status of the job.
        public let message: String?
        /// The output data configuration that you supplied when you created the document classification job.
        public let outputDataConfig: OutputDataConfig?
        /// The time that the document classification job was submitted for processing.
        public let submitTime: Date?
        /// ID for the AWS Key Management Service (KMS) key that Amazon Comprehend uses to encrypt data on the storage volume attached to the ML compute instance(s) that process the analysis job. The VolumeKmsKeyId can be either of the following formats:   KMS Key ID: "1234abcd-12ab-34cd-56ef-1234567890ab"    Amazon Resource Name (ARN) of a KMS Key: "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab"
        public let volumeKmsKeyId: String?
        ///  Configuration parameters for a private Virtual Private Cloud (VPC) containing the resources you are using for your document classification job. For more information, see Amazon VPC.
        public let vpcConfig: VpcConfig?

        public init(dataAccessRoleArn: String? = nil, documentClassifierArn: String? = nil, endTime: Date? = nil, inputDataConfig: InputDataConfig? = nil, jobId: String? = nil, jobName: String? = nil, jobStatus: JobStatus? = nil, message: String? = nil, outputDataConfig: OutputDataConfig? = nil, submitTime: Date? = nil, volumeKmsKeyId: String? = nil, vpcConfig: VpcConfig? = nil) {
            self.dataAccessRoleArn = dataAccessRoleArn
            self.documentClassifierArn = documentClassifierArn
            self.endTime = endTime
            self.inputDataConfig = inputDataConfig
            self.jobId = jobId
            self.jobName = jobName
            self.jobStatus = jobStatus
            self.message = message
            self.outputDataConfig = outputDataConfig
            self.submitTime = submitTime
            self.volumeKmsKeyId = volumeKmsKeyId
            self.vpcConfig = vpcConfig
        }

        private enum CodingKeys: String, CodingKey {
            case dataAccessRoleArn = "DataAccessRoleArn"
            case documentClassifierArn = "DocumentClassifierArn"
            case endTime = "EndTime"
            case inputDataConfig = "InputDataConfig"
            case jobId = "JobId"
            case jobName = "JobName"
            case jobStatus = "JobStatus"
            case message = "Message"
            case outputDataConfig = "OutputDataConfig"
            case submitTime = "SubmitTime"
            case volumeKmsKeyId = "VolumeKmsKeyId"
            case vpcConfig = "VpcConfig"
        }
    }

    public struct DocumentClassifierFilter: AWSEncodableShape {
        /// Filters the list of classifiers based on status.
        public let status: ModelStatus?
        /// Filters the list of classifiers based on the time that the classifier was submitted for processing. Returns only classifiers submitted after the specified time. Classifiers are returned in descending order, newest to oldest.
        public let submitTimeAfter: Date?
        /// Filters the list of classifiers based on the time that the classifier was submitted for processing. Returns only classifiers submitted before the specified time. Classifiers are returned in ascending order, oldest to newest.
        public let submitTimeBefore: Date?

        public init(status: ModelStatus? = nil, submitTimeAfter: Date? = nil, submitTimeBefore: Date? = nil) {
            self.status = status
            self.submitTimeAfter = submitTimeAfter
            self.submitTimeBefore = submitTimeBefore
        }

        private enum CodingKeys: String, CodingKey {
            case status = "Status"
            case submitTimeAfter = "SubmitTimeAfter"
            case submitTimeBefore = "SubmitTimeBefore"
        }
    }

    public struct DocumentClassifierInputDataConfig: AWSEncodableShape & AWSDecodableShape {
        /// A list of augmented manifest files that provide training data for your custom model. An augmented manifest file is a labeled dataset that is produced by Amazon SageMaker Ground Truth. This parameter is required if you set DataFormat to AUGMENTED_MANIFEST.
        public let augmentedManifests: [AugmentedManifestsListItem]?
        /// The format of your training data:    COMPREHEND_CSV: A two-column CSV file, where labels are provided in the first column, and documents are provided in the second. If you use this value, you must provide the S3Uri parameter in your request.    AUGMENTED_MANIFEST: A labeled dataset that is produced by Amazon SageMaker Ground Truth. This file is in JSON lines format. Each line is a complete JSON object that contains a training document and its associated labels.  If you use this value, you must provide the AugmentedManifests parameter in your request.   If you don't specify a value, Amazon Comprehend uses COMPREHEND_CSV as the default.
        public let dataFormat: DocumentClassifierDataFormat?
        /// Indicates the delimiter used to separate each label for training a multi-label classifier. The default delimiter between labels is a pipe (|). You can use a different character as a delimiter (if it's an allowed character) by specifying it under Delimiter for labels. If the training documents use a delimiter other than the default or the delimiter you specify, the labels on that line will be combined to make a single unique label, such as LABELLABELLABEL.
        public let labelDelimiter: String?
        /// The Amazon S3 URI for the input data. The S3 bucket must be in the same region as the API endpoint that you are calling. The URI can point to a single input file or it can provide the prefix for a collection of input files. For example, if you use the URI S3://bucketName/prefix, if the prefix is a single file, Amazon Comprehend uses that file as input. If more than one file begins with the prefix, Amazon Comprehend uses all of them as input. This parameter is required if you set DataFormat to COMPREHEND_CSV.
        public let s3Uri: String?

        public init(augmentedManifests: [AugmentedManifestsListItem]? = nil, dataFormat: DocumentClassifierDataFormat? = nil, labelDelimiter: String? = nil, s3Uri: String? = nil) {
            self.augmentedManifests = augmentedManifests
            self.dataFormat = dataFormat
            self.labelDelimiter = labelDelimiter
            self.s3Uri = s3Uri
        }

        public func validate(name: String) throws {
            try self.augmentedManifests?.forEach {
                try $0.validate(name: "\(name).augmentedManifests[]")
            }
            try self.validate(self.labelDelimiter, name: "labelDelimiter", parent: name, max: 1)
            try self.validate(self.labelDelimiter, name: "labelDelimiter", parent: name, min: 1)
            try self.validate(self.labelDelimiter, name: "labelDelimiter", parent: name, pattern: "^[ ~!@#$%^*\\-_+=|\\\\:;\\t>?/]$")
            try self.validate(self.s3Uri, name: "s3Uri", parent: name, max: 1024)
            try self.validate(self.s3Uri, name: "s3Uri", parent: name, pattern: "s3://[a-z0-9][\\.\\-a-z0-9]{1,61}[a-z0-9](/.*)?")
        }

        private enum CodingKeys: String, CodingKey {
            case augmentedManifests = "AugmentedManifests"
            case dataFormat = "DataFormat"
            case labelDelimiter = "LabelDelimiter"
            case s3Uri = "S3Uri"
        }
    }

    public struct DocumentClassifierOutputDataConfig: AWSEncodableShape & AWSDecodableShape {
        /// ID for the AWS Key Management Service (KMS) key that Amazon Comprehend uses to encrypt the output results from an analysis job. The KmsKeyId can be one of the following formats:   KMS Key ID: "1234abcd-12ab-34cd-56ef-1234567890ab"    Amazon Resource Name (ARN) of a KMS Key: "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab"    KMS Key Alias: "alias/ExampleAlias"    ARN of a KMS Key Alias: "arn:aws:kms:us-west-2:111122223333:alias/ExampleAlias"
        public let kmsKeyId: String?
        /// When you use the OutputDataConfig object while creating a custom classifier, you specify the Amazon S3 location where you want to write the confusion matrix. The URI must be in the same region as the API endpoint that you are calling. The location is used as the prefix for the actual location of this output file. When the custom classifier job is finished, the service creates the output file in a directory specific to the job. The S3Uri field contains the location of the output file, called output.tar.gz. It is a compressed archive that contains the confusion matrix.
        public let s3Uri: String?

        public init(kmsKeyId: String? = nil, s3Uri: String? = nil) {
            self.kmsKeyId = kmsKeyId
            self.s3Uri = s3Uri
        }

        public func validate(name: String) throws {
            try self.validate(self.kmsKeyId, name: "kmsKeyId", parent: name, max: 2048)
            try self.validate(self.s3Uri, name: "s3Uri", parent: name, max: 1024)
            try self.validate(self.s3Uri, name: "s3Uri", parent: name, pattern: "s3://[a-z0-9][\\.\\-a-z0-9]{1,61}[a-z0-9](/.*)?")
        }

        private enum CodingKeys: String, CodingKey {
            case kmsKeyId = "KmsKeyId"
            case s3Uri = "S3Uri"
        }
    }

    public struct DocumentClassifierProperties: AWSDecodableShape {
        /// Information about the document classifier, including the number of documents used for training the classifier, the number of documents used for test the classifier, and an accuracy rating.
        public let classifierMetadata: ClassifierMetadata?
        /// The Amazon Resource Name (ARN) of the AWS Identity and Management (IAM) role that grants Amazon Comprehend read access to your input data.
        public let dataAccessRoleArn: String?
        /// The Amazon Resource Name (ARN) that identifies the document classifier.
        public let documentClassifierArn: String?
        /// The time that training the document classifier completed.
        public let endTime: Date?
        /// The input data configuration that you supplied when you created the document classifier for training.
        public let inputDataConfig: DocumentClassifierInputDataConfig?
        /// The language code for the language of the documents that the classifier was trained on.
        public let languageCode: LanguageCode?
        /// Additional information about the status of the classifier.
        public let message: String?
        /// Indicates the mode in which the specific classifier was trained. This also indicates the format of input documents and the format of the confusion matrix. Each classifier can only be trained in one mode and this cannot be changed once the classifier is trained.
        public let mode: DocumentClassifierMode?
        ///  Provides output results configuration parameters for custom classifier jobs.
        public let outputDataConfig: DocumentClassifierOutputDataConfig?
        /// The status of the document classifier. If the status is TRAINED the classifier is ready to use. If the status is FAILED you can see additional information about why the classifier wasn't trained in the Message field.
        public let status: ModelStatus?
        /// The time that the document classifier was submitted for training.
        public let submitTime: Date?
        /// The time that training of the document classifier was completed. Indicates the time when the training completes on documentation classifiers. You are billed for the time interval between this time and the value of TrainingStartTime.
        public let trainingEndTime: Date?
        /// Indicates the time when the training starts on documentation classifiers. You are billed for the time interval between this time and the value of TrainingEndTime.
        public let trainingStartTime: Date?
        /// ID for the AWS Key Management Service (KMS) key that Amazon Comprehend uses to encrypt data on the storage volume attached to the ML compute instance(s) that process the analysis job. The VolumeKmsKeyId can be either of the following formats:   KMS Key ID: "1234abcd-12ab-34cd-56ef-1234567890ab"    Amazon Resource Name (ARN) of a KMS Key: "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab"
        public let volumeKmsKeyId: String?
        ///  Configuration parameters for a private Virtual Private Cloud (VPC) containing the resources you are using for your custom classifier. For more information, see Amazon VPC.
        public let vpcConfig: VpcConfig?

        public init(classifierMetadata: ClassifierMetadata? = nil, dataAccessRoleArn: String? = nil, documentClassifierArn: String? = nil, endTime: Date? = nil, inputDataConfig: DocumentClassifierInputDataConfig? = nil, languageCode: LanguageCode? = nil, message: String? = nil, mode: DocumentClassifierMode? = nil, outputDataConfig: DocumentClassifierOutputDataConfig? = nil, status: ModelStatus? = nil, submitTime: Date? = nil, trainingEndTime: Date? = nil, trainingStartTime: Date? = nil, volumeKmsKeyId: String? = nil, vpcConfig: VpcConfig? = nil) {
            self.classifierMetadata = classifierMetadata
            self.dataAccessRoleArn = dataAccessRoleArn
            self.documentClassifierArn = documentClassifierArn
            self.endTime = endTime
            self.inputDataConfig = inputDataConfig
            self.languageCode = languageCode
            self.message = message
            self.mode = mode
            self.outputDataConfig = outputDataConfig
            self.status = status
            self.submitTime = submitTime
            self.trainingEndTime = trainingEndTime
            self.trainingStartTime = trainingStartTime
            self.volumeKmsKeyId = volumeKmsKeyId
            self.vpcConfig = vpcConfig
        }

        private enum CodingKeys: String, CodingKey {
            case classifierMetadata = "ClassifierMetadata"
            case dataAccessRoleArn = "DataAccessRoleArn"
            case documentClassifierArn = "DocumentClassifierArn"
            case endTime = "EndTime"
            case inputDataConfig = "InputDataConfig"
            case languageCode = "LanguageCode"
            case message = "Message"
            case mode = "Mode"
            case outputDataConfig = "OutputDataConfig"
            case status = "Status"
            case submitTime = "SubmitTime"
            case trainingEndTime = "TrainingEndTime"
            case trainingStartTime = "TrainingStartTime"
            case volumeKmsKeyId = "VolumeKmsKeyId"
            case vpcConfig = "VpcConfig"
        }
    }

    public struct DocumentLabel: AWSDecodableShape {
        /// The name of the label.
        public let name: String?
        /// The confidence score that Amazon Comprehend has this label correctly attributed.
        public let score: Float?

        public init(name: String? = nil, score: Float? = nil) {
            self.name = name
            self.score = score
        }

        private enum CodingKeys: String, CodingKey {
            case name = "Name"
            case score = "Score"
        }
    }

    public struct DominantLanguage: AWSDecodableShape {
        /// The RFC 5646 language code for the dominant language. For more information about RFC 5646, see Tags for Identifying Languages on the IETF Tools web site.
        public let languageCode: String?
        /// The level of confidence that Amazon Comprehend has in the accuracy of the detection.
        public let score: Float?

        public init(languageCode: String? = nil, score: Float? = nil) {
            self.languageCode = languageCode
            self.score = score
        }

        private enum CodingKeys: String, CodingKey {
            case languageCode = "LanguageCode"
            case score = "Score"
        }
    }

    public struct DominantLanguageDetectionJobFilter: AWSEncodableShape {
        /// Filters on the name of the job.
        public let jobName: String?
        /// Filters the list of jobs based on job status. Returns only jobs with the specified status.
        public let jobStatus: JobStatus?
        /// Filters the list of jobs based on the time that the job was submitted for processing. Returns only jobs submitted after the specified time. Jobs are returned in descending order, newest to oldest.
        public let submitTimeAfter: Date?
        /// Filters the list of jobs based on the time that the job was submitted for processing. Returns only jobs submitted before the specified time. Jobs are returned in ascending order, oldest to newest.
        public let submitTimeBefore: Date?

        public init(jobName: String? = nil, jobStatus: JobStatus? = nil, submitTimeAfter: Date? = nil, submitTimeBefore: Date? = nil) {
            self.jobName = jobName
            self.jobStatus = jobStatus
            self.submitTimeAfter = submitTimeAfter
            self.submitTimeBefore = submitTimeBefore
        }

        public func validate(name: String) throws {
            try self.validate(self.jobName, name: "jobName", parent: name, max: 256)
            try self.validate(self.jobName, name: "jobName", parent: name, min: 1)
            try self.validate(self.jobName, name: "jobName", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-%@]*)$")
        }

        private enum CodingKeys: String, CodingKey {
            case jobName = "JobName"
            case jobStatus = "JobStatus"
            case submitTimeAfter = "SubmitTimeAfter"
            case submitTimeBefore = "SubmitTimeBefore"
        }
    }

    public struct DominantLanguageDetectionJobProperties: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) that gives Amazon Comprehend read access to your input data.
        public let dataAccessRoleArn: String?
        /// The time that the dominant language detection job completed.
        public let endTime: Date?
        /// The input data configuration that you supplied when you created the dominant language detection job.
        public let inputDataConfig: InputDataConfig?
        /// The identifier assigned to the dominant language detection job.
        public let jobId: String?
        /// The name that you assigned to the dominant language detection job.
        public let jobName: String?
        /// The current status of the dominant language detection job. If the status is FAILED, the Message field shows the reason for the failure.
        public let jobStatus: JobStatus?
        /// A description for the status of a job.
        public let message: String?
        /// The output data configuration that you supplied when you created the dominant language detection job.
        public let outputDataConfig: OutputDataConfig?
        /// The time that the dominant language detection job was submitted for processing.
        public let submitTime: Date?
        /// ID for the AWS Key Management Service (KMS) key that Amazon Comprehend uses to encrypt data on the storage volume attached to the ML compute instance(s) that process the analysis job. The VolumeKmsKeyId can be either of the following formats:   KMS Key ID: "1234abcd-12ab-34cd-56ef-1234567890ab"    Amazon Resource Name (ARN) of a KMS Key: "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab"
        public let volumeKmsKeyId: String?
        ///  Configuration parameters for a private Virtual Private Cloud (VPC) containing the resources you are using for your dominant language detection job. For more information, see Amazon VPC.
        public let vpcConfig: VpcConfig?

        public init(dataAccessRoleArn: String? = nil, endTime: Date? = nil, inputDataConfig: InputDataConfig? = nil, jobId: String? = nil, jobName: String? = nil, jobStatus: JobStatus? = nil, message: String? = nil, outputDataConfig: OutputDataConfig? = nil, submitTime: Date? = nil, volumeKmsKeyId: String? = nil, vpcConfig: VpcConfig? = nil) {
            self.dataAccessRoleArn = dataAccessRoleArn
            self.endTime = endTime
            self.inputDataConfig = inputDataConfig
            self.jobId = jobId
            self.jobName = jobName
            self.jobStatus = jobStatus
            self.message = message
            self.outputDataConfig = outputDataConfig
            self.submitTime = submitTime
            self.volumeKmsKeyId = volumeKmsKeyId
            self.vpcConfig = vpcConfig
        }

        private enum CodingKeys: String, CodingKey {
            case dataAccessRoleArn = "DataAccessRoleArn"
            case endTime = "EndTime"
            case inputDataConfig = "InputDataConfig"
            case jobId = "JobId"
            case jobName = "JobName"
            case jobStatus = "JobStatus"
            case message = "Message"
            case outputDataConfig = "OutputDataConfig"
            case submitTime = "SubmitTime"
            case volumeKmsKeyId = "VolumeKmsKeyId"
            case vpcConfig = "VpcConfig"
        }
    }

    public struct EndpointFilter: AWSEncodableShape {
        /// Specifies a date after which the returned endpoint or endpoints were created.
        public let creationTimeAfter: Date?
        /// Specifies a date before which the returned endpoint or endpoints were created.
        public let creationTimeBefore: Date?
        /// The Amazon Resource Number (ARN) of the model to which the endpoint is attached.
        public let modelArn: String?
        /// Specifies the status of the endpoint being returned. Possible values are: Creating, Ready, Updating, Deleting, Failed.
        public let status: EndpointStatus?

        public init(creationTimeAfter: Date? = nil, creationTimeBefore: Date? = nil, modelArn: String? = nil, status: EndpointStatus? = nil) {
            self.creationTimeAfter = creationTimeAfter
            self.creationTimeBefore = creationTimeBefore
            self.modelArn = modelArn
            self.status = status
        }

        public func validate(name: String) throws {
            try self.validate(self.modelArn, name: "modelArn", parent: name, max: 256)
            try self.validate(self.modelArn, name: "modelArn", parent: name, pattern: "arn:aws(-[^:]+)?:comprehend:[a-zA-Z0-9-]*:[0-9]{12}:(document-classifier|entity-recognizer)/[a-zA-Z0-9](-*[a-zA-Z0-9])*")
        }

        private enum CodingKeys: String, CodingKey {
            case creationTimeAfter = "CreationTimeAfter"
            case creationTimeBefore = "CreationTimeBefore"
            case modelArn = "ModelArn"
            case status = "Status"
        }
    }

    public struct EndpointProperties: AWSDecodableShape {
        /// The creation date and time of the endpoint.
        public let creationTime: Date?
        /// The number of inference units currently used by the model using this endpoint.
        public let currentInferenceUnits: Int?
        /// The desired number of inference units to be used by the model using this endpoint. Each inference unit represents of a throughput of 100 characters per second.
        public let desiredInferenceUnits: Int?
        /// The Amazon Resource Number (ARN) of the endpoint.
        public let endpointArn: String?
        /// The date and time that the endpoint was last modified.
        public let lastModifiedTime: Date?
        /// Specifies a reason for failure in cases of Failed status.
        public let message: String?
        /// The Amazon Resource Number (ARN) of the model to which the endpoint is attached.
        public let modelArn: String?
        /// Specifies the status of the endpoint. Because the endpoint updates and creation are asynchronous, so customers will need to wait for the endpoint to be Ready status before making inference requests.
        public let status: EndpointStatus?

        public init(creationTime: Date? = nil, currentInferenceUnits: Int? = nil, desiredInferenceUnits: Int? = nil, endpointArn: String? = nil, lastModifiedTime: Date? = nil, message: String? = nil, modelArn: String? = nil, status: EndpointStatus? = nil) {
            self.creationTime = creationTime
            self.currentInferenceUnits = currentInferenceUnits
            self.desiredInferenceUnits = desiredInferenceUnits
            self.endpointArn = endpointArn
            self.lastModifiedTime = lastModifiedTime
            self.message = message
            self.modelArn = modelArn
            self.status = status
        }

        private enum CodingKeys: String, CodingKey {
            case creationTime = "CreationTime"
            case currentInferenceUnits = "CurrentInferenceUnits"
            case desiredInferenceUnits = "DesiredInferenceUnits"
            case endpointArn = "EndpointArn"
            case lastModifiedTime = "LastModifiedTime"
            case message = "Message"
            case modelArn = "ModelArn"
            case status = "Status"
        }
    }

    public struct EntitiesDetectionJobFilter: AWSEncodableShape {
        /// Filters on the name of the job.
        public let jobName: String?
        /// Filters the list of jobs based on job status. Returns only jobs with the specified status.
        public let jobStatus: JobStatus?
        /// Filters the list of jobs based on the time that the job was submitted for processing. Returns only jobs submitted after the specified time. Jobs are returned in descending order, newest to oldest.
        public let submitTimeAfter: Date?
        /// Filters the list of jobs based on the time that the job was submitted for processing. Returns only jobs submitted before the specified time. Jobs are returned in ascending order, oldest to newest.
        public let submitTimeBefore: Date?

        public init(jobName: String? = nil, jobStatus: JobStatus? = nil, submitTimeAfter: Date? = nil, submitTimeBefore: Date? = nil) {
            self.jobName = jobName
            self.jobStatus = jobStatus
            self.submitTimeAfter = submitTimeAfter
            self.submitTimeBefore = submitTimeBefore
        }

        public func validate(name: String) throws {
            try self.validate(self.jobName, name: "jobName", parent: name, max: 256)
            try self.validate(self.jobName, name: "jobName", parent: name, min: 1)
            try self.validate(self.jobName, name: "jobName", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-%@]*)$")
        }

        private enum CodingKeys: String, CodingKey {
            case jobName = "JobName"
            case jobStatus = "JobStatus"
            case submitTimeAfter = "SubmitTimeAfter"
            case submitTimeBefore = "SubmitTimeBefore"
        }
    }

    public struct EntitiesDetectionJobProperties: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) that gives Amazon Comprehend read access to your input data.
        public let dataAccessRoleArn: String?
        /// The time that the entities detection job completed
        public let endTime: Date?
        /// The Amazon Resource Name (ARN) that identifies the entity recognizer.
        public let entityRecognizerArn: String?
        /// The input data configuration that you supplied when you created the entities detection job.
        public let inputDataConfig: InputDataConfig?
        /// The identifier assigned to the entities detection job.
        public let jobId: String?
        /// The name that you assigned the entities detection job.
        public let jobName: String?
        /// The current status of the entities detection job. If the status is FAILED, the Message field shows the reason for the failure.
        public let jobStatus: JobStatus?
        /// The language code of the input documents.
        public let languageCode: LanguageCode?
        /// A description of the status of a job.
        public let message: String?
        /// The output data configuration that you supplied when you created the entities detection job.
        public let outputDataConfig: OutputDataConfig?
        /// The time that the entities detection job was submitted for processing.
        public let submitTime: Date?
        /// ID for the AWS Key Management Service (KMS) key that Amazon Comprehend uses to encrypt data on the storage volume attached to the ML compute instance(s) that process the analysis job. The VolumeKmsKeyId can be either of the following formats:   KMS Key ID: "1234abcd-12ab-34cd-56ef-1234567890ab"    Amazon Resource Name (ARN) of a KMS Key: "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab"
        public let volumeKmsKeyId: String?
        ///  Configuration parameters for a private Virtual Private Cloud (VPC) containing the resources you are using for your entity detection job. For more information, see Amazon VPC.
        public let vpcConfig: VpcConfig?

        public init(dataAccessRoleArn: String? = nil, endTime: Date? = nil, entityRecognizerArn: String? = nil, inputDataConfig: InputDataConfig? = nil, jobId: String? = nil, jobName: String? = nil, jobStatus: JobStatus? = nil, languageCode: LanguageCode? = nil, message: String? = nil, outputDataConfig: OutputDataConfig? = nil, submitTime: Date? = nil, volumeKmsKeyId: String? = nil, vpcConfig: VpcConfig? = nil) {
            self.dataAccessRoleArn = dataAccessRoleArn
            self.endTime = endTime
            self.entityRecognizerArn = entityRecognizerArn
            self.inputDataConfig = inputDataConfig
            self.jobId = jobId
            self.jobName = jobName
            self.jobStatus = jobStatus
            self.languageCode = languageCode
            self.message = message
            self.outputDataConfig = outputDataConfig
            self.submitTime = submitTime
            self.volumeKmsKeyId = volumeKmsKeyId
            self.vpcConfig = vpcConfig
        }

        private enum CodingKeys: String, CodingKey {
            case dataAccessRoleArn = "DataAccessRoleArn"
            case endTime = "EndTime"
            case entityRecognizerArn = "EntityRecognizerArn"
            case inputDataConfig = "InputDataConfig"
            case jobId = "JobId"
            case jobName = "JobName"
            case jobStatus = "JobStatus"
            case languageCode = "LanguageCode"
            case message = "Message"
            case outputDataConfig = "OutputDataConfig"
            case submitTime = "SubmitTime"
            case volumeKmsKeyId = "VolumeKmsKeyId"
            case vpcConfig = "VpcConfig"
        }
    }

    public struct Entity: AWSDecodableShape {
        /// A character offset in the input text that shows where the entity begins (the first character is at position 0). The offset returns the position of each UTF-8 code point in the string. A code point is the abstract character from a particular graphical representation. For example, a multi-byte UTF-8 character maps to a single code point.
        public let beginOffset: Int?
        /// A character offset in the input text that shows where the entity ends. The offset returns the position of each UTF-8 code point in the string. A code point is the abstract character from a particular graphical representation. For example, a multi-byte UTF-8 character maps to a single code point.
        public let endOffset: Int?
        /// The level of confidence that Amazon Comprehend has in the accuracy of the detection.
        public let score: Float?
        /// The text of the entity.
        public let text: String?
        /// The entity's type.
        public let type: EntityType?

        public init(beginOffset: Int? = nil, endOffset: Int? = nil, score: Float? = nil, text: String? = nil, type: EntityType? = nil) {
            self.beginOffset = beginOffset
            self.endOffset = endOffset
            self.score = score
            self.text = text
            self.type = type
        }

        private enum CodingKeys: String, CodingKey {
            case beginOffset = "BeginOffset"
            case endOffset = "EndOffset"
            case score = "Score"
            case text = "Text"
            case type = "Type"
        }
    }

    public struct EntityRecognizerAnnotations: AWSEncodableShape & AWSDecodableShape {
        ///  Specifies the Amazon S3 location where the annotations for an entity recognizer are located. The URI must be in the same region as the API endpoint that you are calling.
        public let s3Uri: String

        public init(s3Uri: String) {
            self.s3Uri = s3Uri
        }

        public func validate(name: String) throws {
            try self.validate(self.s3Uri, name: "s3Uri", parent: name, max: 1024)
            try self.validate(self.s3Uri, name: "s3Uri", parent: name, pattern: "s3://[a-z0-9][\\.\\-a-z0-9]{1,61}[a-z0-9](/.*)?")
        }

        private enum CodingKeys: String, CodingKey {
            case s3Uri = "S3Uri"
        }
    }

    public struct EntityRecognizerDocuments: AWSEncodableShape & AWSDecodableShape {
        ///  Specifies the Amazon S3 location where the training documents for an entity recognizer are located. The URI must be in the same region as the API endpoint that you are calling.
        public let s3Uri: String

        public init(s3Uri: String) {
            self.s3Uri = s3Uri
        }

        public func validate(name: String) throws {
            try self.validate(self.s3Uri, name: "s3Uri", parent: name, max: 1024)
            try self.validate(self.s3Uri, name: "s3Uri", parent: name, pattern: "s3://[a-z0-9][\\.\\-a-z0-9]{1,61}[a-z0-9](/.*)?")
        }

        private enum CodingKeys: String, CodingKey {
            case s3Uri = "S3Uri"
        }
    }

    public struct EntityRecognizerEntityList: AWSEncodableShape & AWSDecodableShape {
        /// Specifies the Amazon S3 location where the entity list is located. The URI must be in the same region as the API endpoint that you are calling.
        public let s3Uri: String

        public init(s3Uri: String) {
            self.s3Uri = s3Uri
        }

        public func validate(name: String) throws {
            try self.validate(self.s3Uri, name: "s3Uri", parent: name, max: 1024)
            try self.validate(self.s3Uri, name: "s3Uri", parent: name, pattern: "s3://[a-z0-9][\\.\\-a-z0-9]{1,61}[a-z0-9](/.*)?")
        }

        private enum CodingKeys: String, CodingKey {
            case s3Uri = "S3Uri"
        }
    }

    public struct EntityRecognizerEvaluationMetrics: AWSDecodableShape {
        /// A measure of how accurate the recognizer results are for the test data. It is derived from the Precision and Recall values. The F1Score is the harmonic average of the two scores. The highest score is 1, and the worst score is 0.
        public let f1Score: Double?
        /// A measure of the usefulness of the recognizer results in the test data. High precision means that the recognizer returned substantially more relevant results than irrelevant ones.
        public let precision: Double?
        /// A measure of how complete the recognizer results are for the test data. High recall means that the recognizer returned most of the relevant results.
        public let recall: Double?

        public init(f1Score: Double? = nil, precision: Double? = nil, recall: Double? = nil) {
            self.f1Score = f1Score
            self.precision = precision
            self.recall = recall
        }

        private enum CodingKeys: String, CodingKey {
            case f1Score = "F1Score"
            case precision = "Precision"
            case recall = "Recall"
        }
    }

    public struct EntityRecognizerFilter: AWSEncodableShape {
        /// The status of an entity recognizer.
        public let status: ModelStatus?
        /// Filters the list of entities based on the time that the list was submitted for processing. Returns only jobs submitted after the specified time. Jobs are returned in ascending order, oldest to newest.
        public let submitTimeAfter: Date?
        /// Filters the list of entities based on the time that the list was submitted for processing. Returns only jobs submitted before the specified time. Jobs are returned in descending order, newest to oldest.
        public let submitTimeBefore: Date?

        public init(status: ModelStatus? = nil, submitTimeAfter: Date? = nil, submitTimeBefore: Date? = nil) {
            self.status = status
            self.submitTimeAfter = submitTimeAfter
            self.submitTimeBefore = submitTimeBefore
        }

        private enum CodingKeys: String, CodingKey {
            case status = "Status"
            case submitTimeAfter = "SubmitTimeAfter"
            case submitTimeBefore = "SubmitTimeBefore"
        }
    }

    public struct EntityRecognizerInputDataConfig: AWSEncodableShape & AWSDecodableShape {
        /// The S3 location of the CSV file that annotates your training documents.
        public let annotations: EntityRecognizerAnnotations?
        /// A list of augmented manifest files that provide training data for your custom model. An augmented manifest file is a labeled dataset that is produced by Amazon SageMaker Ground Truth. This parameter is required if you set DataFormat to AUGMENTED_MANIFEST.
        public let augmentedManifests: [AugmentedManifestsListItem]?
        /// The format of your training data:    COMPREHEND_CSV: A CSV file that supplements your training documents. The CSV file contains information about the custom entities that your trained model will detect. The required format of the file depends on whether you are providing annotations or an entity list. If you use this value, you must provide your CSV file by using either the Annotations or EntityList parameters. You must provide your training documents by using the Documents parameter.    AUGMENTED_MANIFEST: A labeled dataset that is produced by Amazon SageMaker Ground Truth. This file is in JSON lines format. Each line is a complete JSON object that contains a training document and its labels. Each label annotates a named entity in the training document.  If you use this value, you must provide the AugmentedManifests parameter in your request.   If you don't specify a value, Amazon Comprehend uses COMPREHEND_CSV as the default.
        public let dataFormat: EntityRecognizerDataFormat?
        /// The S3 location of the folder that contains the training documents for your custom entity recognizer. This parameter is required if you set DataFormat to COMPREHEND_CSV.
        public let documents: EntityRecognizerDocuments?
        /// The S3 location of the CSV file that has the entity list for your custom entity recognizer.
        public let entityList: EntityRecognizerEntityList?
        /// The entity types in the labeled training data that Amazon Comprehend uses to train the custom entity recognizer. Any entity types that you don't specify are ignored. A maximum of 25 entity types can be used at one time to train an entity recognizer. Entity types must not contain the following invalid characters: \n (line break), \\n (escaped line break), \r (carriage return), \\r (escaped carriage return), \t (tab), \\t (escaped tab), space, and , (comma).
        public let entityTypes: [EntityTypesListItem]

        public init(annotations: EntityRecognizerAnnotations? = nil, augmentedManifests: [AugmentedManifestsListItem]? = nil, dataFormat: EntityRecognizerDataFormat? = nil, documents: EntityRecognizerDocuments? = nil, entityList: EntityRecognizerEntityList? = nil, entityTypes: [EntityTypesListItem]) {
            self.annotations = annotations
            self.augmentedManifests = augmentedManifests
            self.dataFormat = dataFormat
            self.documents = documents
            self.entityList = entityList
            self.entityTypes = entityTypes
        }

        public func validate(name: String) throws {
            try self.annotations?.validate(name: "\(name).annotations")
            try self.augmentedManifests?.forEach {
                try $0.validate(name: "\(name).augmentedManifests[]")
            }
            try self.documents?.validate(name: "\(name).documents")
            try self.entityList?.validate(name: "\(name).entityList")
            try self.entityTypes.forEach {
                try $0.validate(name: "\(name).entityTypes[]")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case annotations = "Annotations"
            case augmentedManifests = "AugmentedManifests"
            case dataFormat = "DataFormat"
            case documents = "Documents"
            case entityList = "EntityList"
            case entityTypes = "EntityTypes"
        }
    }

    public struct EntityRecognizerMetadata: AWSDecodableShape {
        /// Entity types from the metadata of an entity recognizer.
        public let entityTypes: [EntityRecognizerMetadataEntityTypesListItem]?
        /// Detailed information about the accuracy of an entity recognizer.
        public let evaluationMetrics: EntityRecognizerEvaluationMetrics?
        ///  The number of documents in the input data that were used to test the entity recognizer. Typically this is 10 to 20 percent of the input documents.
        public let numberOfTestDocuments: Int?
        ///  The number of documents in the input data that were used to train the entity recognizer. Typically this is 80 to 90 percent of the input documents.
        public let numberOfTrainedDocuments: Int?

        public init(entityTypes: [EntityRecognizerMetadataEntityTypesListItem]? = nil, evaluationMetrics: EntityRecognizerEvaluationMetrics? = nil, numberOfTestDocuments: Int? = nil, numberOfTrainedDocuments: Int? = nil) {
            self.entityTypes = entityTypes
            self.evaluationMetrics = evaluationMetrics
            self.numberOfTestDocuments = numberOfTestDocuments
            self.numberOfTrainedDocuments = numberOfTrainedDocuments
        }

        private enum CodingKeys: String, CodingKey {
            case entityTypes = "EntityTypes"
            case evaluationMetrics = "EvaluationMetrics"
            case numberOfTestDocuments = "NumberOfTestDocuments"
            case numberOfTrainedDocuments = "NumberOfTrainedDocuments"
        }
    }

    public struct EntityRecognizerMetadataEntityTypesListItem: AWSDecodableShape {
        /// Detailed information about the accuracy of the entity recognizer for a specific item on the list of entity types.
        public let evaluationMetrics: EntityTypesEvaluationMetrics?
        /// Indicates the number of times the given entity type was seen in the training data.
        public let numberOfTrainMentions: Int?
        /// Type of entity from the list of entity types in the metadata of an entity recognizer.
        public let type: String?

        public init(evaluationMetrics: EntityTypesEvaluationMetrics? = nil, numberOfTrainMentions: Int? = nil, type: String? = nil) {
            self.evaluationMetrics = evaluationMetrics
            self.numberOfTrainMentions = numberOfTrainMentions
            self.type = type
        }

        private enum CodingKeys: String, CodingKey {
            case evaluationMetrics = "EvaluationMetrics"
            case numberOfTrainMentions = "NumberOfTrainMentions"
            case type = "Type"
        }
    }

    public struct EntityRecognizerProperties: AWSDecodableShape {
        ///  The Amazon Resource Name (ARN) of the AWS Identity and Management (IAM) role that grants Amazon Comprehend read access to your input data.
        public let dataAccessRoleArn: String?
        /// The time that the recognizer creation completed.
        public let endTime: Date?
        /// The Amazon Resource Name (ARN) that identifies the entity recognizer.
        public let entityRecognizerArn: String?
        /// The input data properties of an entity recognizer.
        public let inputDataConfig: EntityRecognizerInputDataConfig?
        ///  The language of the input documents. All documents must be in the same language. Only English ("en") is currently supported.
        public let languageCode: LanguageCode?
        ///  A description of the status of the recognizer.
        public let message: String?
        ///  Provides information about an entity recognizer.
        public let recognizerMetadata: EntityRecognizerMetadata?
        /// Provides the status of the entity recognizer.
        public let status: ModelStatus?
        /// The time that the recognizer was submitted for processing.
        public let submitTime: Date?
        /// The time that training of the entity recognizer was completed.
        public let trainingEndTime: Date?
        /// The time that training of the entity recognizer started.
        public let trainingStartTime: Date?
        /// ID for the AWS Key Management Service (KMS) key that Amazon Comprehend uses to encrypt data on the storage volume attached to the ML compute instance(s) that process the analysis job. The VolumeKmsKeyId can be either of the following formats:   KMS Key ID: "1234abcd-12ab-34cd-56ef-1234567890ab"    Amazon Resource Name (ARN) of a KMS Key: "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab"
        public let volumeKmsKeyId: String?
        ///  Configuration parameters for a private Virtual Private Cloud (VPC) containing the resources you are using for your custom entity recognizer. For more information, see Amazon VPC.
        public let vpcConfig: VpcConfig?

        public init(dataAccessRoleArn: String? = nil, endTime: Date? = nil, entityRecognizerArn: String? = nil, inputDataConfig: EntityRecognizerInputDataConfig? = nil, languageCode: LanguageCode? = nil, message: String? = nil, recognizerMetadata: EntityRecognizerMetadata? = nil, status: ModelStatus? = nil, submitTime: Date? = nil, trainingEndTime: Date? = nil, trainingStartTime: Date? = nil, volumeKmsKeyId: String? = nil, vpcConfig: VpcConfig? = nil) {
            self.dataAccessRoleArn = dataAccessRoleArn
            self.endTime = endTime
            self.entityRecognizerArn = entityRecognizerArn
            self.inputDataConfig = inputDataConfig
            self.languageCode = languageCode
            self.message = message
            self.recognizerMetadata = recognizerMetadata
            self.status = status
            self.submitTime = submitTime
            self.trainingEndTime = trainingEndTime
            self.trainingStartTime = trainingStartTime
            self.volumeKmsKeyId = volumeKmsKeyId
            self.vpcConfig = vpcConfig
        }

        private enum CodingKeys: String, CodingKey {
            case dataAccessRoleArn = "DataAccessRoleArn"
            case endTime = "EndTime"
            case entityRecognizerArn = "EntityRecognizerArn"
            case inputDataConfig = "InputDataConfig"
            case languageCode = "LanguageCode"
            case message = "Message"
            case recognizerMetadata = "RecognizerMetadata"
            case status = "Status"
            case submitTime = "SubmitTime"
            case trainingEndTime = "TrainingEndTime"
            case trainingStartTime = "TrainingStartTime"
            case volumeKmsKeyId = "VolumeKmsKeyId"
            case vpcConfig = "VpcConfig"
        }
    }

    public struct EntityTypesEvaluationMetrics: AWSDecodableShape {
        /// A measure of how accurate the recognizer results are for a specific entity type in the test data. It is derived from the Precision and Recall values. The F1Score is the harmonic average of the two scores. The highest score is 1, and the worst score is 0.
        public let f1Score: Double?
        /// A measure of the usefulness of the recognizer results for a specific entity type in the test data. High precision means that the recognizer returned substantially more relevant results than irrelevant ones.
        public let precision: Double?
        /// A measure of how complete the recognizer results are for a specific entity type in the test data. High recall means that the recognizer returned most of the relevant results.
        public let recall: Double?

        public init(f1Score: Double? = nil, precision: Double? = nil, recall: Double? = nil) {
            self.f1Score = f1Score
            self.precision = precision
            self.recall = recall
        }

        private enum CodingKeys: String, CodingKey {
            case f1Score = "F1Score"
            case precision = "Precision"
            case recall = "Recall"
        }
    }

    public struct EntityTypesListItem: AWSEncodableShape & AWSDecodableShape {
        /// An entity type within a labeled training dataset that Amazon Comprehend uses to train a custom entity recognizer. Entity types must not contain the following invalid characters: \n (line break), \\n (escaped line break, \r (carriage return), \\r (escaped carriage return), \t (tab), \\t (escaped tab), space, and , (comma).
        public let type: String

        public init(type: String) {
            self.type = type
        }

        public func validate(name: String) throws {
            try self.validate(self.type, name: "type", parent: name, max: 64)
            try self.validate(self.type, name: "type", parent: name, pattern: "^(?:(?!\\\\n+|\\\\t+|\\\\r+|[\\r\\t\\n\\s,]).)+$")
        }

        private enum CodingKeys: String, CodingKey {
            case type = "Type"
        }
    }

    public struct EventsDetectionJobFilter: AWSEncodableShape {
        /// Filters on the name of the events detection job.
        public let jobName: String?
        /// Filters the list of jobs based on job status. Returns only jobs with the specified status.
        public let jobStatus: JobStatus?
        /// Filters the list of jobs based on the time that the job was submitted for processing. Returns only jobs submitted after the specified time. Jobs are returned in descending order, newest to oldest.
        public let submitTimeAfter: Date?
        /// Filters the list of jobs based on the time that the job was submitted for processing. Returns only jobs submitted before the specified time. Jobs are returned in ascending order, oldest to newest.
        public let submitTimeBefore: Date?

        public init(jobName: String? = nil, jobStatus: JobStatus? = nil, submitTimeAfter: Date? = nil, submitTimeBefore: Date? = nil) {
            self.jobName = jobName
            self.jobStatus = jobStatus
            self.submitTimeAfter = submitTimeAfter
            self.submitTimeBefore = submitTimeBefore
        }

        public func validate(name: String) throws {
            try self.validate(self.jobName, name: "jobName", parent: name, max: 256)
            try self.validate(self.jobName, name: "jobName", parent: name, min: 1)
            try self.validate(self.jobName, name: "jobName", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-%@]*)$")
        }

        private enum CodingKeys: String, CodingKey {
            case jobName = "JobName"
            case jobStatus = "JobStatus"
            case submitTimeAfter = "SubmitTimeAfter"
            case submitTimeBefore = "SubmitTimeBefore"
        }
    }

    public struct EventsDetectionJobProperties: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the AWS Identify and Access Management (IAM) role that grants Amazon Comprehend read access to your input data.
        public let dataAccessRoleArn: String?
        /// The time that the events detection job completed.
        public let endTime: Date?
        /// The input data configuration that you supplied when you created the events detection job.
        public let inputDataConfig: InputDataConfig?
        /// The identifier assigned to the events detection job.
        public let jobId: String?
        /// The name you assigned the events detection job.
        public let jobName: String?
        /// The current status of the events detection job.
        public let jobStatus: JobStatus?
        /// The language code of the input documents.
        public let languageCode: LanguageCode?
        /// A description of the status of the events detection job.
        public let message: String?
        /// The output data configuration that you supplied when you created the events detection job.
        public let outputDataConfig: OutputDataConfig?
        /// The time that the events detection job was submitted for processing.
        public let submitTime: Date?
        /// The types of events that are detected by the job.
        public let targetEventTypes: [String]?

        public init(dataAccessRoleArn: String? = nil, endTime: Date? = nil, inputDataConfig: InputDataConfig? = nil, jobId: String? = nil, jobName: String? = nil, jobStatus: JobStatus? = nil, languageCode: LanguageCode? = nil, message: String? = nil, outputDataConfig: OutputDataConfig? = nil, submitTime: Date? = nil, targetEventTypes: [String]? = nil) {
            self.dataAccessRoleArn = dataAccessRoleArn
            self.endTime = endTime
            self.inputDataConfig = inputDataConfig
            self.jobId = jobId
            self.jobName = jobName
            self.jobStatus = jobStatus
            self.languageCode = languageCode
            self.message = message
            self.outputDataConfig = outputDataConfig
            self.submitTime = submitTime
            self.targetEventTypes = targetEventTypes
        }

        private enum CodingKeys: String, CodingKey {
            case dataAccessRoleArn = "DataAccessRoleArn"
            case endTime = "EndTime"
            case inputDataConfig = "InputDataConfig"
            case jobId = "JobId"
            case jobName = "JobName"
            case jobStatus = "JobStatus"
            case languageCode = "LanguageCode"
            case message = "Message"
            case outputDataConfig = "OutputDataConfig"
            case submitTime = "SubmitTime"
            case targetEventTypes = "TargetEventTypes"
        }
    }

    public struct InputDataConfig: AWSEncodableShape & AWSDecodableShape {
        /// Specifies how the text in an input file should be processed:    ONE_DOC_PER_FILE - Each file is considered a separate document. Use this option when you are processing large documents, such as newspaper articles or scientific papers.    ONE_DOC_PER_LINE - Each line in a file is considered a separate document. Use this option when you are processing many short documents, such as text messages.
        public let inputFormat: InputFormat?
        /// The Amazon S3 URI for the input data. The URI must be in same region as the API endpoint that you are calling. The URI can point to a single input file or it can provide the prefix for a collection of data files.  For example, if you use the URI S3://bucketName/prefix, if the prefix is a single file, Amazon Comprehend uses that file as input. If more than one file begins with the prefix, Amazon Comprehend uses all of them as input.
        public let s3Uri: String

        public init(inputFormat: InputFormat? = nil, s3Uri: String) {
            self.inputFormat = inputFormat
            self.s3Uri = s3Uri
        }

        public func validate(name: String) throws {
            try self.validate(self.s3Uri, name: "s3Uri", parent: name, max: 1024)
            try self.validate(self.s3Uri, name: "s3Uri", parent: name, pattern: "s3://[a-z0-9][\\.\\-a-z0-9]{1,61}[a-z0-9](/.*)?")
        }

        private enum CodingKeys: String, CodingKey {
            case inputFormat = "InputFormat"
            case s3Uri = "S3Uri"
        }
    }

    public struct KeyPhrase: AWSDecodableShape {
        /// A character offset in the input text that shows where the key phrase begins (the first character is at position 0). The offset returns the position of each UTF-8 code point in the string. A code point is the abstract character from a particular graphical representation. For example, a multi-byte UTF-8 character maps to a single code point.
        public let beginOffset: Int?
        /// A character offset in the input text where the key phrase ends. The offset returns the position of each UTF-8 code point in the string. A code point is the abstract character from a particular graphical representation. For example, a multi-byte UTF-8 character maps to a single code point.
        public let endOffset: Int?
        /// The level of confidence that Amazon Comprehend has in the accuracy of the detection.
        public let score: Float?
        /// The text of a key noun phrase.
        public let text: String?

        public init(beginOffset: Int? = nil, endOffset: Int? = nil, score: Float? = nil, text: String? = nil) {
            self.beginOffset = beginOffset
            self.endOffset = endOffset
            self.score = score
            self.text = text
        }

        private enum CodingKeys: String, CodingKey {
            case beginOffset = "BeginOffset"
            case endOffset = "EndOffset"
            case score = "Score"
            case text = "Text"
        }
    }

    public struct KeyPhrasesDetectionJobFilter: AWSEncodableShape {
        /// Filters on the name of the job.
        public let jobName: String?
        /// Filters the list of jobs based on job status. Returns only jobs with the specified status.
        public let jobStatus: JobStatus?
        /// Filters the list of jobs based on the time that the job was submitted for processing. Returns only jobs submitted after the specified time. Jobs are returned in descending order, newest to oldest.
        public let submitTimeAfter: Date?
        /// Filters the list of jobs based on the time that the job was submitted for processing. Returns only jobs submitted before the specified time. Jobs are returned in ascending order, oldest to newest.
        public let submitTimeBefore: Date?

        public init(jobName: String? = nil, jobStatus: JobStatus? = nil, submitTimeAfter: Date? = nil, submitTimeBefore: Date? = nil) {
            self.jobName = jobName
            self.jobStatus = jobStatus
            self.submitTimeAfter = submitTimeAfter
            self.submitTimeBefore = submitTimeBefore
        }

        public func validate(name: String) throws {
            try self.validate(self.jobName, name: "jobName", parent: name, max: 256)
            try self.validate(self.jobName, name: "jobName", parent: name, min: 1)
            try self.validate(self.jobName, name: "jobName", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-%@]*)$")
        }

        private enum CodingKeys: String, CodingKey {
            case jobName = "JobName"
            case jobStatus = "JobStatus"
            case submitTimeAfter = "SubmitTimeAfter"
            case submitTimeBefore = "SubmitTimeBefore"
        }
    }

    public struct KeyPhrasesDetectionJobProperties: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) that gives Amazon Comprehend read access to your input data.
        public let dataAccessRoleArn: String?
        /// The time that the key phrases detection job completed.
        public let endTime: Date?
        /// The input data configuration that you supplied when you created the key phrases detection job.
        public let inputDataConfig: InputDataConfig?
        /// The identifier assigned to the key phrases detection job.
        public let jobId: String?
        /// The name that you assigned the key phrases detection job.
        public let jobName: String?
        /// The current status of the key phrases detection job. If the status is FAILED, the Message field shows the reason for the failure.
        public let jobStatus: JobStatus?
        /// The language code of the input documents.
        public let languageCode: LanguageCode?
        /// A description of the status of a job.
        public let message: String?
        /// The output data configuration that you supplied when you created the key phrases detection job.
        public let outputDataConfig: OutputDataConfig?
        /// The time that the key phrases detection job was submitted for processing.
        public let submitTime: Date?
        /// ID for the AWS Key Management Service (KMS) key that Amazon Comprehend uses to encrypt data on the storage volume attached to the ML compute instance(s) that process the analysis job. The VolumeKmsKeyId can be either of the following formats:   KMS Key ID: "1234abcd-12ab-34cd-56ef-1234567890ab"    Amazon Resource Name (ARN) of a KMS Key: "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab"
        public let volumeKmsKeyId: String?
        ///  Configuration parameters for a private Virtual Private Cloud (VPC) containing the resources you are using for your key phrases detection job. For more information, see Amazon VPC.
        public let vpcConfig: VpcConfig?

        public init(dataAccessRoleArn: String? = nil, endTime: Date? = nil, inputDataConfig: InputDataConfig? = nil, jobId: String? = nil, jobName: String? = nil, jobStatus: JobStatus? = nil, languageCode: LanguageCode? = nil, message: String? = nil, outputDataConfig: OutputDataConfig? = nil, submitTime: Date? = nil, volumeKmsKeyId: String? = nil, vpcConfig: VpcConfig? = nil) {
            self.dataAccessRoleArn = dataAccessRoleArn
            self.endTime = endTime
            self.inputDataConfig = inputDataConfig
            self.jobId = jobId
            self.jobName = jobName
            self.jobStatus = jobStatus
            self.languageCode = languageCode
            self.message = message
            self.outputDataConfig = outputDataConfig
            self.submitTime = submitTime
            self.volumeKmsKeyId = volumeKmsKeyId
            self.vpcConfig = vpcConfig
        }

        private enum CodingKeys: String, CodingKey {
            case dataAccessRoleArn = "DataAccessRoleArn"
            case endTime = "EndTime"
            case inputDataConfig = "InputDataConfig"
            case jobId = "JobId"
            case jobName = "JobName"
            case jobStatus = "JobStatus"
            case languageCode = "LanguageCode"
            case message = "Message"
            case outputDataConfig = "OutputDataConfig"
            case submitTime = "SubmitTime"
            case volumeKmsKeyId = "VolumeKmsKeyId"
            case vpcConfig = "VpcConfig"
        }
    }

    public struct ListDocumentClassificationJobsRequest: AWSEncodableShape {
        /// Filters the jobs that are returned. You can filter jobs on their names, status, or the date and time that they were submitted. You can only set one filter at a time.
        public let filter: DocumentClassificationJobFilter?
        /// The maximum number of results to return in each page. The default is 100.
        public let maxResults: Int?
        /// Identifies the next page of results to return.
        public let nextToken: String?

        public init(filter: DocumentClassificationJobFilter? = nil, maxResults: Int? = nil, nextToken: String? = nil) {
            self.filter = filter
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.filter?.validate(name: "\(name).filter")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 500)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case filter = "Filter"
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
        }
    }

    public struct ListDocumentClassificationJobsResponse: AWSDecodableShape {
        /// A list containing the properties of each job returned.
        public let documentClassificationJobPropertiesList: [DocumentClassificationJobProperties]?
        /// Identifies the next page of results to return.
        public let nextToken: String?

        public init(documentClassificationJobPropertiesList: [DocumentClassificationJobProperties]? = nil, nextToken: String? = nil) {
            self.documentClassificationJobPropertiesList = documentClassificationJobPropertiesList
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case documentClassificationJobPropertiesList = "DocumentClassificationJobPropertiesList"
            case nextToken = "NextToken"
        }
    }

    public struct ListDocumentClassifiersRequest: AWSEncodableShape {
        /// Filters the jobs that are returned. You can filter jobs on their name, status, or the date and time that they were submitted. You can only set one filter at a time.
        public let filter: DocumentClassifierFilter?
        /// The maximum number of results to return in each page. The default is 100.
        public let maxResults: Int?
        /// Identifies the next page of results to return.
        public let nextToken: String?

        public init(filter: DocumentClassifierFilter? = nil, maxResults: Int? = nil, nextToken: String? = nil) {
            self.filter = filter
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 500)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case filter = "Filter"
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
        }
    }

    public struct ListDocumentClassifiersResponse: AWSDecodableShape {
        /// A list containing the properties of each job returned.
        public let documentClassifierPropertiesList: [DocumentClassifierProperties]?
        /// Identifies the next page of results to return.
        public let nextToken: String?

        public init(documentClassifierPropertiesList: [DocumentClassifierProperties]? = nil, nextToken: String? = nil) {
            self.documentClassifierPropertiesList = documentClassifierPropertiesList
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case documentClassifierPropertiesList = "DocumentClassifierPropertiesList"
            case nextToken = "NextToken"
        }
    }

    public struct ListDominantLanguageDetectionJobsRequest: AWSEncodableShape {
        /// Filters that jobs that are returned. You can filter jobs on their name, status, or the date and time that they were submitted. You can only set one filter at a time.
        public let filter: DominantLanguageDetectionJobFilter?
        /// The maximum number of results to return in each page. The default is 100.
        public let maxResults: Int?
        /// Identifies the next page of results to return.
        public let nextToken: String?

        public init(filter: DominantLanguageDetectionJobFilter? = nil, maxResults: Int? = nil, nextToken: String? = nil) {
            self.filter = filter
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.filter?.validate(name: "\(name).filter")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 500)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case filter = "Filter"
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
        }
    }

    public struct ListDominantLanguageDetectionJobsResponse: AWSDecodableShape {
        /// A list containing the properties of each job that is returned.
        public let dominantLanguageDetectionJobPropertiesList: [DominantLanguageDetectionJobProperties]?
        /// Identifies the next page of results to return.
        public let nextToken: String?

        public init(dominantLanguageDetectionJobPropertiesList: [DominantLanguageDetectionJobProperties]? = nil, nextToken: String? = nil) {
            self.dominantLanguageDetectionJobPropertiesList = dominantLanguageDetectionJobPropertiesList
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case dominantLanguageDetectionJobPropertiesList = "DominantLanguageDetectionJobPropertiesList"
            case nextToken = "NextToken"
        }
    }

    public struct ListEndpointsRequest: AWSEncodableShape {
        /// Filters the endpoints that are returned. You can filter endpoints on their name, model, status, or the date and time that they were created. You can only set one filter at a time.
        public let filter: EndpointFilter?
        /// The maximum number of results to return in each page. The default is 100.
        public let maxResults: Int?
        /// Identifies the next page of results to return.
        public let nextToken: String?

        public init(filter: EndpointFilter? = nil, maxResults: Int? = nil, nextToken: String? = nil) {
            self.filter = filter
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.filter?.validate(name: "\(name).filter")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 500)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case filter = "Filter"
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
        }
    }

    public struct ListEndpointsResponse: AWSDecodableShape {
        /// Displays a list of endpoint properties being retrieved by the service in response to the request.
        public let endpointPropertiesList: [EndpointProperties]?
        /// Identifies the next page of results to return.
        public let nextToken: String?

        public init(endpointPropertiesList: [EndpointProperties]? = nil, nextToken: String? = nil) {
            self.endpointPropertiesList = endpointPropertiesList
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case endpointPropertiesList = "EndpointPropertiesList"
            case nextToken = "NextToken"
        }
    }

    public struct ListEntitiesDetectionJobsRequest: AWSEncodableShape {
        /// Filters the jobs that are returned. You can filter jobs on their name, status, or the date and time that they were submitted. You can only set one filter at a time.
        public let filter: EntitiesDetectionJobFilter?
        /// The maximum number of results to return in each page. The default is 100.
        public let maxResults: Int?
        /// Identifies the next page of results to return.
        public let nextToken: String?

        public init(filter: EntitiesDetectionJobFilter? = nil, maxResults: Int? = nil, nextToken: String? = nil) {
            self.filter = filter
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.filter?.validate(name: "\(name).filter")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 500)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case filter = "Filter"
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
        }
    }

    public struct ListEntitiesDetectionJobsResponse: AWSDecodableShape {
        /// A list containing the properties of each job that is returned.
        public let entitiesDetectionJobPropertiesList: [EntitiesDetectionJobProperties]?
        /// Identifies the next page of results to return.
        public let nextToken: String?

        public init(entitiesDetectionJobPropertiesList: [EntitiesDetectionJobProperties]? = nil, nextToken: String? = nil) {
            self.entitiesDetectionJobPropertiesList = entitiesDetectionJobPropertiesList
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case entitiesDetectionJobPropertiesList = "EntitiesDetectionJobPropertiesList"
            case nextToken = "NextToken"
        }
    }

    public struct ListEntityRecognizersRequest: AWSEncodableShape {
        /// Filters the list of entities returned. You can filter on Status, SubmitTimeBefore, or SubmitTimeAfter. You can only set one filter at a time.
        public let filter: EntityRecognizerFilter?
        ///  The maximum number of results to return on each page. The default is 100.
        public let maxResults: Int?
        /// Identifies the next page of results to return.
        public let nextToken: String?

        public init(filter: EntityRecognizerFilter? = nil, maxResults: Int? = nil, nextToken: String? = nil) {
            self.filter = filter
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 500)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case filter = "Filter"
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
        }
    }

    public struct ListEntityRecognizersResponse: AWSDecodableShape {
        /// The list of properties of an entity recognizer.
        public let entityRecognizerPropertiesList: [EntityRecognizerProperties]?
        /// Identifies the next page of results to return.
        public let nextToken: String?

        public init(entityRecognizerPropertiesList: [EntityRecognizerProperties]? = nil, nextToken: String? = nil) {
            self.entityRecognizerPropertiesList = entityRecognizerPropertiesList
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case entityRecognizerPropertiesList = "EntityRecognizerPropertiesList"
            case nextToken = "NextToken"
        }
    }

    public struct ListEventsDetectionJobsRequest: AWSEncodableShape {
        /// Filters the jobs that are returned. You can filter jobs on their name, status, or the date and time that they were submitted. You can only set one filter at a time.
        public let filter: EventsDetectionJobFilter?
        /// The maximum number of results to return in each page.
        public let maxResults: Int?
        /// Identifies the next page of results to return.
        public let nextToken: String?

        public init(filter: EventsDetectionJobFilter? = nil, maxResults: Int? = nil, nextToken: String? = nil) {
            self.filter = filter
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.filter?.validate(name: "\(name).filter")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 500)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case filter = "Filter"
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
        }
    }

    public struct ListEventsDetectionJobsResponse: AWSDecodableShape {
        /// A list containing the properties of each job that is returned.
        public let eventsDetectionJobPropertiesList: [EventsDetectionJobProperties]?
        /// Identifies the next page of results to return.
        public let nextToken: String?

        public init(eventsDetectionJobPropertiesList: [EventsDetectionJobProperties]? = nil, nextToken: String? = nil) {
            self.eventsDetectionJobPropertiesList = eventsDetectionJobPropertiesList
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case eventsDetectionJobPropertiesList = "EventsDetectionJobPropertiesList"
            case nextToken = "NextToken"
        }
    }

    public struct ListKeyPhrasesDetectionJobsRequest: AWSEncodableShape {
        /// Filters the jobs that are returned. You can filter jobs on their name, status, or the date and time that they were submitted. You can only set one filter at a time.
        public let filter: KeyPhrasesDetectionJobFilter?
        /// The maximum number of results to return in each page. The default is 100.
        public let maxResults: Int?
        /// Identifies the next page of results to return.
        public let nextToken: String?

        public init(filter: KeyPhrasesDetectionJobFilter? = nil, maxResults: Int? = nil, nextToken: String? = nil) {
            self.filter = filter
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.filter?.validate(name: "\(name).filter")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 500)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case filter = "Filter"
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
        }
    }

    public struct ListKeyPhrasesDetectionJobsResponse: AWSDecodableShape {
        /// A list containing the properties of each job that is returned.
        public let keyPhrasesDetectionJobPropertiesList: [KeyPhrasesDetectionJobProperties]?
        /// Identifies the next page of results to return.
        public let nextToken: String?

        public init(keyPhrasesDetectionJobPropertiesList: [KeyPhrasesDetectionJobProperties]? = nil, nextToken: String? = nil) {
            self.keyPhrasesDetectionJobPropertiesList = keyPhrasesDetectionJobPropertiesList
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case keyPhrasesDetectionJobPropertiesList = "KeyPhrasesDetectionJobPropertiesList"
            case nextToken = "NextToken"
        }
    }

    public struct ListPiiEntitiesDetectionJobsRequest: AWSEncodableShape {
        /// Filters the jobs that are returned. You can filter jobs on their name, status, or the date and time that they were submitted. You can only set one filter at a time.
        public let filter: PiiEntitiesDetectionJobFilter?
        /// The maximum number of results to return in each page.
        public let maxResults: Int?
        /// Identifies the next page of results to return.
        public let nextToken: String?

        public init(filter: PiiEntitiesDetectionJobFilter? = nil, maxResults: Int? = nil, nextToken: String? = nil) {
            self.filter = filter
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.filter?.validate(name: "\(name).filter")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 500)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case filter = "Filter"
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
        }
    }

    public struct ListPiiEntitiesDetectionJobsResponse: AWSDecodableShape {
        /// Identifies the next page of results to return.
        public let nextToken: String?
        /// A list containing the properties of each job that is returned.
        public let piiEntitiesDetectionJobPropertiesList: [PiiEntitiesDetectionJobProperties]?

        public init(nextToken: String? = nil, piiEntitiesDetectionJobPropertiesList: [PiiEntitiesDetectionJobProperties]? = nil) {
            self.nextToken = nextToken
            self.piiEntitiesDetectionJobPropertiesList = piiEntitiesDetectionJobPropertiesList
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case piiEntitiesDetectionJobPropertiesList = "PiiEntitiesDetectionJobPropertiesList"
        }
    }

    public struct ListSentimentDetectionJobsRequest: AWSEncodableShape {
        /// Filters the jobs that are returned. You can filter jobs on their name, status, or the date and time that they were submitted. You can only set one filter at a time.
        public let filter: SentimentDetectionJobFilter?
        /// The maximum number of results to return in each page. The default is 100.
        public let maxResults: Int?
        /// Identifies the next page of results to return.
        public let nextToken: String?

        public init(filter: SentimentDetectionJobFilter? = nil, maxResults: Int? = nil, nextToken: String? = nil) {
            self.filter = filter
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.filter?.validate(name: "\(name).filter")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 500)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case filter = "Filter"
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
        }
    }

    public struct ListSentimentDetectionJobsResponse: AWSDecodableShape {
        /// Identifies the next page of results to return.
        public let nextToken: String?
        /// A list containing the properties of each job that is returned.
        public let sentimentDetectionJobPropertiesList: [SentimentDetectionJobProperties]?

        public init(nextToken: String? = nil, sentimentDetectionJobPropertiesList: [SentimentDetectionJobProperties]? = nil) {
            self.nextToken = nextToken
            self.sentimentDetectionJobPropertiesList = sentimentDetectionJobPropertiesList
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case sentimentDetectionJobPropertiesList = "SentimentDetectionJobPropertiesList"
        }
    }

    public struct ListTagsForResourceRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the given Amazon Comprehend resource you are querying.
        public let resourceArn: String

        public init(resourceArn: String) {
            self.resourceArn = resourceArn
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, max: 256)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, pattern: "arn:aws(-[^:]+)?:comprehend:[a-zA-Z0-9-]*:[0-9]{12}:[a-zA-Z0-9-]{1,64}/[a-zA-Z0-9](-*[a-zA-Z0-9])*")
        }

        private enum CodingKeys: String, CodingKey {
            case resourceArn = "ResourceArn"
        }
    }

    public struct ListTagsForResourceResponse: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the given Amazon Comprehend resource you are querying.
        public let resourceArn: String?
        /// Tags associated with the Amazon Comprehend resource being queried. A tag is a key-value pair that adds as a metadata to a resource used by Amazon Comprehend. For example, a tag with "Sales" as the key might be added to a resource to indicate its use by the sales department.
        public let tags: [Tag]?

        public init(resourceArn: String? = nil, tags: [Tag]? = nil) {
            self.resourceArn = resourceArn
            self.tags = tags
        }

        private enum CodingKeys: String, CodingKey {
            case resourceArn = "ResourceArn"
            case tags = "Tags"
        }
    }

    public struct ListTopicsDetectionJobsRequest: AWSEncodableShape {
        /// Filters the jobs that are returned. Jobs can be filtered on their name, status, or the date and time that they were submitted. You can set only one filter at a time.
        public let filter: TopicsDetectionJobFilter?
        /// The maximum number of results to return in each page. The default is 100.
        public let maxResults: Int?
        /// Identifies the next page of results to return.
        public let nextToken: String?

        public init(filter: TopicsDetectionJobFilter? = nil, maxResults: Int? = nil, nextToken: String? = nil) {
            self.filter = filter
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.filter?.validate(name: "\(name).filter")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 500)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case filter = "Filter"
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
        }
    }

    public struct ListTopicsDetectionJobsResponse: AWSDecodableShape {
        /// Identifies the next page of results to return.
        public let nextToken: String?
        /// A list containing the properties of each job that is returned.
        public let topicsDetectionJobPropertiesList: [TopicsDetectionJobProperties]?

        public init(nextToken: String? = nil, topicsDetectionJobPropertiesList: [TopicsDetectionJobProperties]? = nil) {
            self.nextToken = nextToken
            self.topicsDetectionJobPropertiesList = topicsDetectionJobPropertiesList
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case topicsDetectionJobPropertiesList = "TopicsDetectionJobPropertiesList"
        }
    }

    public struct OutputDataConfig: AWSEncodableShape & AWSDecodableShape {
        /// ID for the AWS Key Management Service (KMS) key that Amazon Comprehend uses to encrypt the output results from an analysis job. The KmsKeyId can be one of the following formats:   KMS Key ID: "1234abcd-12ab-34cd-56ef-1234567890ab"    Amazon Resource Name (ARN) of a KMS Key: "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab"    KMS Key Alias: "alias/ExampleAlias"    ARN of a KMS Key Alias: "arn:aws:kms:us-west-2:111122223333:alias/ExampleAlias"
        public let kmsKeyId: String?
        /// When you use the OutputDataConfig object with asynchronous operations, you specify the Amazon S3 location where you want to write the output data. The URI must be in the same region as the API endpoint that you are calling. The location is used as the prefix for the actual location of the output file. When the topic detection job is finished, the service creates an output file in a directory specific to the job. The S3Uri field contains the location of the output file, called output.tar.gz. It is a compressed archive that contains the ouput of the operation.
        public let s3Uri: String

        public init(kmsKeyId: String? = nil, s3Uri: String) {
            self.kmsKeyId = kmsKeyId
            self.s3Uri = s3Uri
        }

        public func validate(name: String) throws {
            try self.validate(self.kmsKeyId, name: "kmsKeyId", parent: name, max: 2048)
            try self.validate(self.s3Uri, name: "s3Uri", parent: name, max: 1024)
            try self.validate(self.s3Uri, name: "s3Uri", parent: name, pattern: "s3://[a-z0-9][\\.\\-a-z0-9]{1,61}[a-z0-9](/.*)?")
        }

        private enum CodingKeys: String, CodingKey {
            case kmsKeyId = "KmsKeyId"
            case s3Uri = "S3Uri"
        }
    }

    public struct PartOfSpeechTag: AWSDecodableShape {
        /// The confidence that Amazon Comprehend has that the part of speech was correctly identified.
        public let score: Float?
        /// Identifies the part of speech that the token represents.
        public let tag: PartOfSpeechTagType?

        public init(score: Float? = nil, tag: PartOfSpeechTagType? = nil) {
            self.score = score
            self.tag = tag
        }

        private enum CodingKeys: String, CodingKey {
            case score = "Score"
            case tag = "Tag"
        }
    }

    public struct PiiEntitiesDetectionJobFilter: AWSEncodableShape {
        /// Filters on the name of the job.
        public let jobName: String?
        /// Filters the list of jobs based on job status. Returns only jobs with the specified status.
        public let jobStatus: JobStatus?
        /// Filters the list of jobs based on the time that the job was submitted for processing. Returns only jobs submitted after the specified time. Jobs are returned in descending order, newest to oldest.
        public let submitTimeAfter: Date?
        /// Filters the list of jobs based on the time that the job was submitted for processing. Returns only jobs submitted before the specified time. Jobs are returned in ascending order, oldest to newest.
        public let submitTimeBefore: Date?

        public init(jobName: String? = nil, jobStatus: JobStatus? = nil, submitTimeAfter: Date? = nil, submitTimeBefore: Date? = nil) {
            self.jobName = jobName
            self.jobStatus = jobStatus
            self.submitTimeAfter = submitTimeAfter
            self.submitTimeBefore = submitTimeBefore
        }

        public func validate(name: String) throws {
            try self.validate(self.jobName, name: "jobName", parent: name, max: 256)
            try self.validate(self.jobName, name: "jobName", parent: name, min: 1)
            try self.validate(self.jobName, name: "jobName", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-%@]*)$")
        }

        private enum CodingKeys: String, CodingKey {
            case jobName = "JobName"
            case jobStatus = "JobStatus"
            case submitTimeAfter = "SubmitTimeAfter"
            case submitTimeBefore = "SubmitTimeBefore"
        }
    }

    public struct PiiEntitiesDetectionJobProperties: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) that gives Amazon Comprehend read access to your input data.
        public let dataAccessRoleArn: String?
        /// The time that the PII entities detection job completed.
        public let endTime: Date?
        /// The input properties for a PII entities detection job.
        public let inputDataConfig: InputDataConfig?
        /// The identifier assigned to the PII entities detection job.
        public let jobId: String?
        /// The name that you assigned the PII entities detection job.
        public let jobName: String?
        /// The current status of the PII entities detection job. If the status is FAILED, the Message field shows the reason for the failure.
        public let jobStatus: JobStatus?
        /// The language code of the input documents
        public let languageCode: LanguageCode?
        /// A description of the status of a job.
        public let message: String?
        /// Specifies whether the output provides the locations (offsets) of PII entities or a file in which PII entities are redacted.
        public let mode: PiiEntitiesDetectionMode?
        /// The output data configuration that you supplied when you created the PII entities detection job.
        public let outputDataConfig: PiiOutputDataConfig?
        /// Provides configuration parameters for PII entity redaction. This parameter is required if you set the Mode parameter to ONLY_REDACTION. In that case, you must provide a RedactionConfig definition that includes the PiiEntityTypes parameter.
        public let redactionConfig: RedactionConfig?
        /// The time that the PII entities detection job was submitted for processing.
        public let submitTime: Date?

        public init(dataAccessRoleArn: String? = nil, endTime: Date? = nil, inputDataConfig: InputDataConfig? = nil, jobId: String? = nil, jobName: String? = nil, jobStatus: JobStatus? = nil, languageCode: LanguageCode? = nil, message: String? = nil, mode: PiiEntitiesDetectionMode? = nil, outputDataConfig: PiiOutputDataConfig? = nil, redactionConfig: RedactionConfig? = nil, submitTime: Date? = nil) {
            self.dataAccessRoleArn = dataAccessRoleArn
            self.endTime = endTime
            self.inputDataConfig = inputDataConfig
            self.jobId = jobId
            self.jobName = jobName
            self.jobStatus = jobStatus
            self.languageCode = languageCode
            self.message = message
            self.mode = mode
            self.outputDataConfig = outputDataConfig
            self.redactionConfig = redactionConfig
            self.submitTime = submitTime
        }

        private enum CodingKeys: String, CodingKey {
            case dataAccessRoleArn = "DataAccessRoleArn"
            case endTime = "EndTime"
            case inputDataConfig = "InputDataConfig"
            case jobId = "JobId"
            case jobName = "JobName"
            case jobStatus = "JobStatus"
            case languageCode = "LanguageCode"
            case message = "Message"
            case mode = "Mode"
            case outputDataConfig = "OutputDataConfig"
            case redactionConfig = "RedactionConfig"
            case submitTime = "SubmitTime"
        }
    }

    public struct PiiEntity: AWSDecodableShape {
        /// A character offset in the input text that shows where the PII entity begins (the first character is at position 0). The offset returns the position of each UTF-8 code point in the string. A code point is the abstract character from a particular graphical representation. For example, a multi-byte UTF-8 character maps to a single code point.
        public let beginOffset: Int?
        /// A character offset in the input text that shows where the PII entity ends. The offset returns the position of each UTF-8 code point in the string. A code point is the abstract character from a particular graphical representation. For example, a multi-byte UTF-8 character maps to a single code point.
        public let endOffset: Int?
        /// The level of confidence that Amazon Comprehend has in the accuracy of the detection.
        public let score: Float?
        /// The entity's type.
        public let type: PiiEntityType?

        public init(beginOffset: Int? = nil, endOffset: Int? = nil, score: Float? = nil, type: PiiEntityType? = nil) {
            self.beginOffset = beginOffset
            self.endOffset = endOffset
            self.score = score
            self.type = type
        }

        private enum CodingKeys: String, CodingKey {
            case beginOffset = "BeginOffset"
            case endOffset = "EndOffset"
            case score = "Score"
            case type = "Type"
        }
    }

    public struct PiiOutputDataConfig: AWSDecodableShape {
        /// ID for the AWS Key Management Service (KMS) key that Amazon Comprehend uses to encrypt the output results from an analysis job.
        public let kmsKeyId: String?
        /// When you use the PiiOutputDataConfig object with asynchronous operations, you specify the Amazon S3 location where you want to write the output data.
        public let s3Uri: String

        public init(kmsKeyId: String? = nil, s3Uri: String) {
            self.kmsKeyId = kmsKeyId
            self.s3Uri = s3Uri
        }

        private enum CodingKeys: String, CodingKey {
            case kmsKeyId = "KmsKeyId"
            case s3Uri = "S3Uri"
        }
    }

    public struct RedactionConfig: AWSEncodableShape & AWSDecodableShape {
        /// A character that replaces each character in the redacted PII entity.
        public let maskCharacter: String?
        /// Specifies whether the PII entity is redacted with the mask character or the entity type.
        public let maskMode: PiiEntitiesDetectionMaskMode?
        /// An array of the types of PII entities that Amazon Comprehend detects in the input text for your request.
        public let piiEntityTypes: [PiiEntityType]?

        public init(maskCharacter: String? = nil, maskMode: PiiEntitiesDetectionMaskMode? = nil, piiEntityTypes: [PiiEntityType]? = nil) {
            self.maskCharacter = maskCharacter
            self.maskMode = maskMode
            self.piiEntityTypes = piiEntityTypes
        }

        public func validate(name: String) throws {
            try self.validate(self.maskCharacter, name: "maskCharacter", parent: name, max: 1)
            try self.validate(self.maskCharacter, name: "maskCharacter", parent: name, min: 1)
            try self.validate(self.maskCharacter, name: "maskCharacter", parent: name, pattern: "[!@#$%&*]")
        }

        private enum CodingKeys: String, CodingKey {
            case maskCharacter = "MaskCharacter"
            case maskMode = "MaskMode"
            case piiEntityTypes = "PiiEntityTypes"
        }
    }

    public struct SentimentDetectionJobFilter: AWSEncodableShape {
        /// Filters on the name of the job.
        public let jobName: String?
        /// Filters the list of jobs based on job status. Returns only jobs with the specified status.
        public let jobStatus: JobStatus?
        /// Filters the list of jobs based on the time that the job was submitted for processing. Returns only jobs submitted after the specified time. Jobs are returned in descending order, newest to oldest.
        public let submitTimeAfter: Date?
        /// Filters the list of jobs based on the time that the job was submitted for processing. Returns only jobs submitted before the specified time. Jobs are returned in ascending order, oldest to newest.
        public let submitTimeBefore: Date?

        public init(jobName: String? = nil, jobStatus: JobStatus? = nil, submitTimeAfter: Date? = nil, submitTimeBefore: Date? = nil) {
            self.jobName = jobName
            self.jobStatus = jobStatus
            self.submitTimeAfter = submitTimeAfter
            self.submitTimeBefore = submitTimeBefore
        }

        public func validate(name: String) throws {
            try self.validate(self.jobName, name: "jobName", parent: name, max: 256)
            try self.validate(self.jobName, name: "jobName", parent: name, min: 1)
            try self.validate(self.jobName, name: "jobName", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-%@]*)$")
        }

        private enum CodingKeys: String, CodingKey {
            case jobName = "JobName"
            case jobStatus = "JobStatus"
            case submitTimeAfter = "SubmitTimeAfter"
            case submitTimeBefore = "SubmitTimeBefore"
        }
    }

    public struct SentimentDetectionJobProperties: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) that gives Amazon Comprehend read access to your input data.
        public let dataAccessRoleArn: String?
        /// The time that the sentiment detection job ended.
        public let endTime: Date?
        /// The input data configuration that you supplied when you created the sentiment detection job.
        public let inputDataConfig: InputDataConfig?
        /// The identifier assigned to the sentiment detection job.
        public let jobId: String?
        /// The name that you assigned to the sentiment detection job
        public let jobName: String?
        /// The current status of the sentiment detection job. If the status is FAILED, the Messages field shows the reason for the failure.
        public let jobStatus: JobStatus?
        /// The language code of the input documents.
        public let languageCode: LanguageCode?
        /// A description of the status of a job.
        public let message: String?
        /// The output data configuration that you supplied when you created the sentiment detection job.
        public let outputDataConfig: OutputDataConfig?
        /// The time that the sentiment detection job was submitted for processing.
        public let submitTime: Date?
        /// ID for the AWS Key Management Service (KMS) key that Amazon Comprehend uses to encrypt data on the storage volume attached to the ML compute instance(s) that process the analysis job. The VolumeKmsKeyId can be either of the following formats:   KMS Key ID: "1234abcd-12ab-34cd-56ef-1234567890ab"    Amazon Resource Name (ARN) of a KMS Key: "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab"
        public let volumeKmsKeyId: String?
        ///  Configuration parameters for a private Virtual Private Cloud (VPC) containing the resources you are using for your sentiment detection job. For more information, see Amazon VPC.
        public let vpcConfig: VpcConfig?

        public init(dataAccessRoleArn: String? = nil, endTime: Date? = nil, inputDataConfig: InputDataConfig? = nil, jobId: String? = nil, jobName: String? = nil, jobStatus: JobStatus? = nil, languageCode: LanguageCode? = nil, message: String? = nil, outputDataConfig: OutputDataConfig? = nil, submitTime: Date? = nil, volumeKmsKeyId: String? = nil, vpcConfig: VpcConfig? = nil) {
            self.dataAccessRoleArn = dataAccessRoleArn
            self.endTime = endTime
            self.inputDataConfig = inputDataConfig
            self.jobId = jobId
            self.jobName = jobName
            self.jobStatus = jobStatus
            self.languageCode = languageCode
            self.message = message
            self.outputDataConfig = outputDataConfig
            self.submitTime = submitTime
            self.volumeKmsKeyId = volumeKmsKeyId
            self.vpcConfig = vpcConfig
        }

        private enum CodingKeys: String, CodingKey {
            case dataAccessRoleArn = "DataAccessRoleArn"
            case endTime = "EndTime"
            case inputDataConfig = "InputDataConfig"
            case jobId = "JobId"
            case jobName = "JobName"
            case jobStatus = "JobStatus"
            case languageCode = "LanguageCode"
            case message = "Message"
            case outputDataConfig = "OutputDataConfig"
            case submitTime = "SubmitTime"
            case volumeKmsKeyId = "VolumeKmsKeyId"
            case vpcConfig = "VpcConfig"
        }
    }

    public struct SentimentScore: AWSDecodableShape {
        /// The level of confidence that Amazon Comprehend has in the accuracy of its detection of the MIXED sentiment.
        public let mixed: Float?
        /// The level of confidence that Amazon Comprehend has in the accuracy of its detection of the NEGATIVE sentiment.
        public let negative: Float?
        /// The level of confidence that Amazon Comprehend has in the accuracy of its detection of the NEUTRAL sentiment.
        public let neutral: Float?
        /// The level of confidence that Amazon Comprehend has in the accuracy of its detection of the POSITIVE sentiment.
        public let positive: Float?

        public init(mixed: Float? = nil, negative: Float? = nil, neutral: Float? = nil, positive: Float? = nil) {
            self.mixed = mixed
            self.negative = negative
            self.neutral = neutral
            self.positive = positive
        }

        private enum CodingKeys: String, CodingKey {
            case mixed = "Mixed"
            case negative = "Negative"
            case neutral = "Neutral"
            case positive = "Positive"
        }
    }

    public struct StartDocumentClassificationJobRequest: AWSEncodableShape {
        /// A unique identifier for the request. If you do not set the client request token, Amazon Comprehend generates one.
        public let clientRequestToken: String?
        /// The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that grants Amazon Comprehend read access to your input data.
        public let dataAccessRoleArn: String
        /// The Amazon Resource Name (ARN) of the document classifier to use to process the job.
        public let documentClassifierArn: String
        /// Specifies the format and location of the input data for the job.
        public let inputDataConfig: InputDataConfig
        /// The identifier of the job.
        public let jobName: String?
        /// Specifies where to send the output files.
        public let outputDataConfig: OutputDataConfig
        /// ID for the AWS Key Management Service (KMS) key that Amazon Comprehend uses to encrypt data on the storage volume attached to the ML compute instance(s) that process the analysis job. The VolumeKmsKeyId can be either of the following formats:   KMS Key ID: "1234abcd-12ab-34cd-56ef-1234567890ab"    Amazon Resource Name (ARN) of a KMS Key: "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab"
        public let volumeKmsKeyId: String?
        /// Configuration parameters for an optional private Virtual Private Cloud (VPC) containing the resources you are using for your document classification job. For more information, see Amazon VPC.
        public let vpcConfig: VpcConfig?

        public init(clientRequestToken: String? = StartDocumentClassificationJobRequest.idempotencyToken(), dataAccessRoleArn: String, documentClassifierArn: String, inputDataConfig: InputDataConfig, jobName: String? = nil, outputDataConfig: OutputDataConfig, volumeKmsKeyId: String? = nil, vpcConfig: VpcConfig? = nil) {
            self.clientRequestToken = clientRequestToken
            self.dataAccessRoleArn = dataAccessRoleArn
            self.documentClassifierArn = documentClassifierArn
            self.inputDataConfig = inputDataConfig
            self.jobName = jobName
            self.outputDataConfig = outputDataConfig
            self.volumeKmsKeyId = volumeKmsKeyId
            self.vpcConfig = vpcConfig
        }

        public func validate(name: String) throws {
            try self.validate(self.clientRequestToken, name: "clientRequestToken", parent: name, max: 64)
            try self.validate(self.clientRequestToken, name: "clientRequestToken", parent: name, min: 1)
            try self.validate(self.clientRequestToken, name: "clientRequestToken", parent: name, pattern: "^[a-zA-Z0-9-]+$")
            try self.validate(self.dataAccessRoleArn, name: "dataAccessRoleArn", parent: name, max: 2048)
            try self.validate(self.dataAccessRoleArn, name: "dataAccessRoleArn", parent: name, min: 20)
            try self.validate(self.dataAccessRoleArn, name: "dataAccessRoleArn", parent: name, pattern: "arn:aws(-[^:]+)?:iam::[0-9]{12}:role/.+")
            try self.validate(self.documentClassifierArn, name: "documentClassifierArn", parent: name, max: 256)
            try self.validate(self.documentClassifierArn, name: "documentClassifierArn", parent: name, pattern: "arn:aws(-[^:]+)?:comprehend:[a-zA-Z0-9-]*:[0-9]{12}:document-classifier/[a-zA-Z0-9](-*[a-zA-Z0-9])*")
            try self.inputDataConfig.validate(name: "\(name).inputDataConfig")
            try self.validate(self.jobName, name: "jobName", parent: name, max: 256)
            try self.validate(self.jobName, name: "jobName", parent: name, min: 1)
            try self.validate(self.jobName, name: "jobName", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-%@]*)$")
            try self.outputDataConfig.validate(name: "\(name).outputDataConfig")
            try self.validate(self.volumeKmsKeyId, name: "volumeKmsKeyId", parent: name, max: 2048)
            try self.vpcConfig?.validate(name: "\(name).vpcConfig")
        }

        private enum CodingKeys: String, CodingKey {
            case clientRequestToken = "ClientRequestToken"
            case dataAccessRoleArn = "DataAccessRoleArn"
            case documentClassifierArn = "DocumentClassifierArn"
            case inputDataConfig = "InputDataConfig"
            case jobName = "JobName"
            case outputDataConfig = "OutputDataConfig"
            case volumeKmsKeyId = "VolumeKmsKeyId"
            case vpcConfig = "VpcConfig"
        }
    }

    public struct StartDocumentClassificationJobResponse: AWSDecodableShape {
        /// The identifier generated for the job. To get the status of the job, use this identifier with the operation.
        public let jobId: String?
        /// The status of the job:   SUBMITTED - The job has been received and queued for processing.   IN_PROGRESS - Amazon Comprehend is processing the job.   COMPLETED - The job was successfully completed and the output is available.   FAILED - The job did not complete. For details, use the operation.   STOP_REQUESTED - Amazon Comprehend has received a stop request for the job and is processing the request.   STOPPED - The job was successfully stopped without completing.
        public let jobStatus: JobStatus?

        public init(jobId: String? = nil, jobStatus: JobStatus? = nil) {
            self.jobId = jobId
            self.jobStatus = jobStatus
        }

        private enum CodingKeys: String, CodingKey {
            case jobId = "JobId"
            case jobStatus = "JobStatus"
        }
    }

    public struct StartDominantLanguageDetectionJobRequest: AWSEncodableShape {
        /// A unique identifier for the request. If you do not set the client request token, Amazon Comprehend generates one.
        public let clientRequestToken: String?
        /// The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that grants Amazon Comprehend read access to your input data. For more information, see https://docs.aws.amazon.com/comprehend/latest/dg/access-control-managing-permissions.html#auth-role-permissions.
        public let dataAccessRoleArn: String
        /// Specifies the format and location of the input data for the job.
        public let inputDataConfig: InputDataConfig
        /// An identifier for the job.
        public let jobName: String?
        /// Specifies where to send the output files.
        public let outputDataConfig: OutputDataConfig
        /// ID for the AWS Key Management Service (KMS) key that Amazon Comprehend uses to encrypt data on the storage volume attached to the ML compute instance(s) that process the analysis job. The VolumeKmsKeyId can be either of the following formats:   KMS Key ID: "1234abcd-12ab-34cd-56ef-1234567890ab"    Amazon Resource Name (ARN) of a KMS Key: "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab"
        public let volumeKmsKeyId: String?
        /// Configuration parameters for an optional private Virtual Private Cloud (VPC) containing the resources you are using for your dominant language detection job. For more information, see Amazon VPC.
        public let vpcConfig: VpcConfig?

        public init(clientRequestToken: String? = StartDominantLanguageDetectionJobRequest.idempotencyToken(), dataAccessRoleArn: String, inputDataConfig: InputDataConfig, jobName: String? = nil, outputDataConfig: OutputDataConfig, volumeKmsKeyId: String? = nil, vpcConfig: VpcConfig? = nil) {
            self.clientRequestToken = clientRequestToken
            self.dataAccessRoleArn = dataAccessRoleArn
            self.inputDataConfig = inputDataConfig
            self.jobName = jobName
            self.outputDataConfig = outputDataConfig
            self.volumeKmsKeyId = volumeKmsKeyId
            self.vpcConfig = vpcConfig
        }

        public func validate(name: String) throws {
            try self.validate(self.clientRequestToken, name: "clientRequestToken", parent: name, max: 64)
            try self.validate(self.clientRequestToken, name: "clientRequestToken", parent: name, min: 1)
            try self.validate(self.clientRequestToken, name: "clientRequestToken", parent: name, pattern: "^[a-zA-Z0-9-]+$")
            try self.validate(self.dataAccessRoleArn, name: "dataAccessRoleArn", parent: name, max: 2048)
            try self.validate(self.dataAccessRoleArn, name: "dataAccessRoleArn", parent: name, min: 20)
            try self.validate(self.dataAccessRoleArn, name: "dataAccessRoleArn", parent: name, pattern: "arn:aws(-[^:]+)?:iam::[0-9]{12}:role/.+")
            try self.inputDataConfig.validate(name: "\(name).inputDataConfig")
            try self.validate(self.jobName, name: "jobName", parent: name, max: 256)
            try self.validate(self.jobName, name: "jobName", parent: name, min: 1)
            try self.validate(self.jobName, name: "jobName", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-%@]*)$")
            try self.outputDataConfig.validate(name: "\(name).outputDataConfig")
            try self.validate(self.volumeKmsKeyId, name: "volumeKmsKeyId", parent: name, max: 2048)
            try self.vpcConfig?.validate(name: "\(name).vpcConfig")
        }

        private enum CodingKeys: String, CodingKey {
            case clientRequestToken = "ClientRequestToken"
            case dataAccessRoleArn = "DataAccessRoleArn"
            case inputDataConfig = "InputDataConfig"
            case jobName = "JobName"
            case outputDataConfig = "OutputDataConfig"
            case volumeKmsKeyId = "VolumeKmsKeyId"
            case vpcConfig = "VpcConfig"
        }
    }

    public struct StartDominantLanguageDetectionJobResponse: AWSDecodableShape {
        /// The identifier generated for the job. To get the status of a job, use this identifier with the operation.
        public let jobId: String?
        /// The status of the job.    SUBMITTED - The job has been received and is queued for processing.   IN_PROGRESS - Amazon Comprehend is processing the job.   COMPLETED - The job was successfully completed and the output is available.   FAILED - The job did not complete. To get details, use the operation.
        public let jobStatus: JobStatus?

        public init(jobId: String? = nil, jobStatus: JobStatus? = nil) {
            self.jobId = jobId
            self.jobStatus = jobStatus
        }

        private enum CodingKeys: String, CodingKey {
            case jobId = "JobId"
            case jobStatus = "JobStatus"
        }
    }

    public struct StartEntitiesDetectionJobRequest: AWSEncodableShape {
        /// A unique identifier for the request. If you don't set the client request token, Amazon Comprehend generates one.
        public let clientRequestToken: String?
        /// The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that grants Amazon Comprehend read access to your input data. For more information, see https://docs.aws.amazon.com/comprehend/latest/dg/access-control-managing-permissions.html#auth-role-permissions.
        public let dataAccessRoleArn: String
        /// The Amazon Resource Name (ARN) that identifies the specific entity recognizer to be used by the StartEntitiesDetectionJob. This ARN is optional and is only used for a custom entity recognition job.
        public let entityRecognizerArn: String?
        /// Specifies the format and location of the input data for the job.
        public let inputDataConfig: InputDataConfig
        /// The identifier of the job.
        public let jobName: String?
        /// The language of the input documents. All documents must be in the same language. You can specify any of the languages supported by Amazon Comprehend. If custom entities recognition is used, this parameter is ignored and the language used for training the model is used instead.
        public let languageCode: LanguageCode
        /// Specifies where to send the output files.
        public let outputDataConfig: OutputDataConfig
        /// ID for the AWS Key Management Service (KMS) key that Amazon Comprehend uses to encrypt data on the storage volume attached to the ML compute instance(s) that process the analysis job. The VolumeKmsKeyId can be either of the following formats:   KMS Key ID: "1234abcd-12ab-34cd-56ef-1234567890ab"    Amazon Resource Name (ARN) of a KMS Key: "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab"
        public let volumeKmsKeyId: String?
        /// Configuration parameters for an optional private Virtual Private Cloud (VPC) containing the resources you are using for your entity detection job. For more information, see Amazon VPC.
        public let vpcConfig: VpcConfig?

        public init(clientRequestToken: String? = StartEntitiesDetectionJobRequest.idempotencyToken(), dataAccessRoleArn: String, entityRecognizerArn: String? = nil, inputDataConfig: InputDataConfig, jobName: String? = nil, languageCode: LanguageCode, outputDataConfig: OutputDataConfig, volumeKmsKeyId: String? = nil, vpcConfig: VpcConfig? = nil) {
            self.clientRequestToken = clientRequestToken
            self.dataAccessRoleArn = dataAccessRoleArn
            self.entityRecognizerArn = entityRecognizerArn
            self.inputDataConfig = inputDataConfig
            self.jobName = jobName
            self.languageCode = languageCode
            self.outputDataConfig = outputDataConfig
            self.volumeKmsKeyId = volumeKmsKeyId
            self.vpcConfig = vpcConfig
        }

        public func validate(name: String) throws {
            try self.validate(self.clientRequestToken, name: "clientRequestToken", parent: name, max: 64)
            try self.validate(self.clientRequestToken, name: "clientRequestToken", parent: name, min: 1)
            try self.validate(self.clientRequestToken, name: "clientRequestToken", parent: name, pattern: "^[a-zA-Z0-9-]+$")
            try self.validate(self.dataAccessRoleArn, name: "dataAccessRoleArn", parent: name, max: 2048)
            try self.validate(self.dataAccessRoleArn, name: "dataAccessRoleArn", parent: name, min: 20)
            try self.validate(self.dataAccessRoleArn, name: "dataAccessRoleArn", parent: name, pattern: "arn:aws(-[^:]+)?:iam::[0-9]{12}:role/.+")
            try self.validate(self.entityRecognizerArn, name: "entityRecognizerArn", parent: name, max: 256)
            try self.validate(self.entityRecognizerArn, name: "entityRecognizerArn", parent: name, pattern: "arn:aws(-[^:]+)?:comprehend:[a-zA-Z0-9-]*:[0-9]{12}:entity-recognizer/[a-zA-Z0-9](-*[a-zA-Z0-9])*")
            try self.inputDataConfig.validate(name: "\(name).inputDataConfig")
            try self.validate(self.jobName, name: "jobName", parent: name, max: 256)
            try self.validate(self.jobName, name: "jobName", parent: name, min: 1)
            try self.validate(self.jobName, name: "jobName", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-%@]*)$")
            try self.outputDataConfig.validate(name: "\(name).outputDataConfig")
            try self.validate(self.volumeKmsKeyId, name: "volumeKmsKeyId", parent: name, max: 2048)
            try self.vpcConfig?.validate(name: "\(name).vpcConfig")
        }

        private enum CodingKeys: String, CodingKey {
            case clientRequestToken = "ClientRequestToken"
            case dataAccessRoleArn = "DataAccessRoleArn"
            case entityRecognizerArn = "EntityRecognizerArn"
            case inputDataConfig = "InputDataConfig"
            case jobName = "JobName"
            case languageCode = "LanguageCode"
            case outputDataConfig = "OutputDataConfig"
            case volumeKmsKeyId = "VolumeKmsKeyId"
            case vpcConfig = "VpcConfig"
        }
    }

    public struct StartEntitiesDetectionJobResponse: AWSDecodableShape {
        /// The identifier generated for the job. To get the status of job, use this identifier with the operation.
        public let jobId: String?
        /// The status of the job.    SUBMITTED - The job has been received and is queued for processing.   IN_PROGRESS - Amazon Comprehend is processing the job.   COMPLETED - The job was successfully completed and the output is available.   FAILED - The job did not complete. To get details, use the operation.   STOP_REQUESTED - Amazon Comprehend has received a stop request for the job and is processing the request.   STOPPED - The job was successfully stopped without completing.
        public let jobStatus: JobStatus?

        public init(jobId: String? = nil, jobStatus: JobStatus? = nil) {
            self.jobId = jobId
            self.jobStatus = jobStatus
        }

        private enum CodingKeys: String, CodingKey {
            case jobId = "JobId"
            case jobStatus = "JobStatus"
        }
    }

    public struct StartEventsDetectionJobRequest: AWSEncodableShape {
        /// An unique identifier for the request. If you don't set the client request token, Amazon Comprehend generates one.
        public let clientRequestToken: String?
        /// The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that grants Amazon Comprehend read access to your input data.
        public let dataAccessRoleArn: String
        /// Specifies the format and location of the input data for the job.
        public let inputDataConfig: InputDataConfig
        /// The identifier of the events detection job.
        public let jobName: String?
        /// The language code of the input documents.
        public let languageCode: LanguageCode
        /// Specifies where to send the output files.
        public let outputDataConfig: OutputDataConfig
        /// The types of events to detect in the input documents.
        public let targetEventTypes: [String]

        public init(clientRequestToken: String? = StartEventsDetectionJobRequest.idempotencyToken(), dataAccessRoleArn: String, inputDataConfig: InputDataConfig, jobName: String? = nil, languageCode: LanguageCode, outputDataConfig: OutputDataConfig, targetEventTypes: [String]) {
            self.clientRequestToken = clientRequestToken
            self.dataAccessRoleArn = dataAccessRoleArn
            self.inputDataConfig = inputDataConfig
            self.jobName = jobName
            self.languageCode = languageCode
            self.outputDataConfig = outputDataConfig
            self.targetEventTypes = targetEventTypes
        }

        public func validate(name: String) throws {
            try self.validate(self.clientRequestToken, name: "clientRequestToken", parent: name, max: 64)
            try self.validate(self.clientRequestToken, name: "clientRequestToken", parent: name, min: 1)
            try self.validate(self.clientRequestToken, name: "clientRequestToken", parent: name, pattern: "^[a-zA-Z0-9-]+$")
            try self.validate(self.dataAccessRoleArn, name: "dataAccessRoleArn", parent: name, max: 2048)
            try self.validate(self.dataAccessRoleArn, name: "dataAccessRoleArn", parent: name, min: 20)
            try self.validate(self.dataAccessRoleArn, name: "dataAccessRoleArn", parent: name, pattern: "arn:aws(-[^:]+)?:iam::[0-9]{12}:role/.+")
            try self.inputDataConfig.validate(name: "\(name).inputDataConfig")
            try self.validate(self.jobName, name: "jobName", parent: name, max: 256)
            try self.validate(self.jobName, name: "jobName", parent: name, min: 1)
            try self.validate(self.jobName, name: "jobName", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-%@]*)$")
            try self.outputDataConfig.validate(name: "\(name).outputDataConfig")
            try self.targetEventTypes.forEach {
                try validate($0, name: "targetEventTypes[]", parent: name, max: 40)
                try validate($0, name: "targetEventTypes[]", parent: name, min: 1)
                try validate($0, name: "targetEventTypes[]", parent: name, pattern: "[A-Z_]*")
            }
            try self.validate(self.targetEventTypes, name: "targetEventTypes", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case clientRequestToken = "ClientRequestToken"
            case dataAccessRoleArn = "DataAccessRoleArn"
            case inputDataConfig = "InputDataConfig"
            case jobName = "JobName"
            case languageCode = "LanguageCode"
            case outputDataConfig = "OutputDataConfig"
            case targetEventTypes = "TargetEventTypes"
        }
    }

    public struct StartEventsDetectionJobResponse: AWSDecodableShape {
        /// An unique identifier for the request. If you don't set the client request token, Amazon Comprehend generates one.
        public let jobId: String?
        /// The status of the events detection job.
        public let jobStatus: JobStatus?

        public init(jobId: String? = nil, jobStatus: JobStatus? = nil) {
            self.jobId = jobId
            self.jobStatus = jobStatus
        }

        private enum CodingKeys: String, CodingKey {
            case jobId = "JobId"
            case jobStatus = "JobStatus"
        }
    }

    public struct StartKeyPhrasesDetectionJobRequest: AWSEncodableShape {
        /// A unique identifier for the request. If you don't set the client request token, Amazon Comprehend generates one.
        public let clientRequestToken: String?
        /// The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that grants Amazon Comprehend read access to your input data. For more information, see https://docs.aws.amazon.com/comprehend/latest/dg/access-control-managing-permissions.html#auth-role-permissions.
        public let dataAccessRoleArn: String
        /// Specifies the format and location of the input data for the job.
        public let inputDataConfig: InputDataConfig
        /// The identifier of the job.
        public let jobName: String?
        /// The language of the input documents. You can specify any of the primary languages supported by Amazon Comprehend. All documents must be in the same language.
        public let languageCode: LanguageCode
        /// Specifies where to send the output files.
        public let outputDataConfig: OutputDataConfig
        /// ID for the AWS Key Management Service (KMS) key that Amazon Comprehend uses to encrypt data on the storage volume attached to the ML compute instance(s) that process the analysis job. The VolumeKmsKeyId can be either of the following formats:   KMS Key ID: "1234abcd-12ab-34cd-56ef-1234567890ab"    Amazon Resource Name (ARN) of a KMS Key: "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab"
        public let volumeKmsKeyId: String?
        ///  Configuration parameters for an optional private Virtual Private Cloud (VPC) containing the resources you are using for your key phrases detection job. For more information, see Amazon VPC.
        public let vpcConfig: VpcConfig?

        public init(clientRequestToken: String? = StartKeyPhrasesDetectionJobRequest.idempotencyToken(), dataAccessRoleArn: String, inputDataConfig: InputDataConfig, jobName: String? = nil, languageCode: LanguageCode, outputDataConfig: OutputDataConfig, volumeKmsKeyId: String? = nil, vpcConfig: VpcConfig? = nil) {
            self.clientRequestToken = clientRequestToken
            self.dataAccessRoleArn = dataAccessRoleArn
            self.inputDataConfig = inputDataConfig
            self.jobName = jobName
            self.languageCode = languageCode
            self.outputDataConfig = outputDataConfig
            self.volumeKmsKeyId = volumeKmsKeyId
            self.vpcConfig = vpcConfig
        }

        public func validate(name: String) throws {
            try self.validate(self.clientRequestToken, name: "clientRequestToken", parent: name, max: 64)
            try self.validate(self.clientRequestToken, name: "clientRequestToken", parent: name, min: 1)
            try self.validate(self.clientRequestToken, name: "clientRequestToken", parent: name, pattern: "^[a-zA-Z0-9-]+$")
            try self.validate(self.dataAccessRoleArn, name: "dataAccessRoleArn", parent: name, max: 2048)
            try self.validate(self.dataAccessRoleArn, name: "dataAccessRoleArn", parent: name, min: 20)
            try self.validate(self.dataAccessRoleArn, name: "dataAccessRoleArn", parent: name, pattern: "arn:aws(-[^:]+)?:iam::[0-9]{12}:role/.+")
            try self.inputDataConfig.validate(name: "\(name).inputDataConfig")
            try self.validate(self.jobName, name: "jobName", parent: name, max: 256)
            try self.validate(self.jobName, name: "jobName", parent: name, min: 1)
            try self.validate(self.jobName, name: "jobName", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-%@]*)$")
            try self.outputDataConfig.validate(name: "\(name).outputDataConfig")
            try self.validate(self.volumeKmsKeyId, name: "volumeKmsKeyId", parent: name, max: 2048)
            try self.vpcConfig?.validate(name: "\(name).vpcConfig")
        }

        private enum CodingKeys: String, CodingKey {
            case clientRequestToken = "ClientRequestToken"
            case dataAccessRoleArn = "DataAccessRoleArn"
            case inputDataConfig = "InputDataConfig"
            case jobName = "JobName"
            case languageCode = "LanguageCode"
            case outputDataConfig = "OutputDataConfig"
            case volumeKmsKeyId = "VolumeKmsKeyId"
            case vpcConfig = "VpcConfig"
        }
    }

    public struct StartKeyPhrasesDetectionJobResponse: AWSDecodableShape {
        /// The identifier generated for the job. To get the status of a job, use this identifier with the operation.
        public let jobId: String?
        /// The status of the job.    SUBMITTED - The job has been received and is queued for processing.   IN_PROGRESS - Amazon Comprehend is processing the job.   COMPLETED - The job was successfully completed and the output is available.   FAILED - The job did not complete. To get details, use the operation.
        public let jobStatus: JobStatus?

        public init(jobId: String? = nil, jobStatus: JobStatus? = nil) {
            self.jobId = jobId
            self.jobStatus = jobStatus
        }

        private enum CodingKeys: String, CodingKey {
            case jobId = "JobId"
            case jobStatus = "JobStatus"
        }
    }

    public struct StartPiiEntitiesDetectionJobRequest: AWSEncodableShape {
        /// A unique identifier for the request. If you don't set the client request token, Amazon Comprehend generates one.
        public let clientRequestToken: String?
        /// The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that grants Amazon Comprehend read access to your input data.
        public let dataAccessRoleArn: String
        /// The input properties for a PII entities detection job.
        public let inputDataConfig: InputDataConfig
        /// The identifier of the job.
        public let jobName: String?
        /// The language of the input documents.
        public let languageCode: LanguageCode
        /// Specifies whether the output provides the locations (offsets) of PII entities or a file in which PII entities are redacted.
        public let mode: PiiEntitiesDetectionMode
        /// Provides conﬁguration parameters for the output of PII entity detection jobs.
        public let outputDataConfig: OutputDataConfig
        /// Provides configuration parameters for PII entity redaction. This parameter is required if you set the Mode parameter to ONLY_REDACTION. In that case, you must provide a RedactionConfig definition that includes the PiiEntityTypes parameter.
        public let redactionConfig: RedactionConfig?

        public init(clientRequestToken: String? = StartPiiEntitiesDetectionJobRequest.idempotencyToken(), dataAccessRoleArn: String, inputDataConfig: InputDataConfig, jobName: String? = nil, languageCode: LanguageCode, mode: PiiEntitiesDetectionMode, outputDataConfig: OutputDataConfig, redactionConfig: RedactionConfig? = nil) {
            self.clientRequestToken = clientRequestToken
            self.dataAccessRoleArn = dataAccessRoleArn
            self.inputDataConfig = inputDataConfig
            self.jobName = jobName
            self.languageCode = languageCode
            self.mode = mode
            self.outputDataConfig = outputDataConfig
            self.redactionConfig = redactionConfig
        }

        public func validate(name: String) throws {
            try self.validate(self.clientRequestToken, name: "clientRequestToken", parent: name, max: 64)
            try self.validate(self.clientRequestToken, name: "clientRequestToken", parent: name, min: 1)
            try self.validate(self.clientRequestToken, name: "clientRequestToken", parent: name, pattern: "^[a-zA-Z0-9-]+$")
            try self.validate(self.dataAccessRoleArn, name: "dataAccessRoleArn", parent: name, max: 2048)
            try self.validate(self.dataAccessRoleArn, name: "dataAccessRoleArn", parent: name, min: 20)
            try self.validate(self.dataAccessRoleArn, name: "dataAccessRoleArn", parent: name, pattern: "arn:aws(-[^:]+)?:iam::[0-9]{12}:role/.+")
            try self.inputDataConfig.validate(name: "\(name).inputDataConfig")
            try self.validate(self.jobName, name: "jobName", parent: name, max: 256)
            try self.validate(self.jobName, name: "jobName", parent: name, min: 1)
            try self.validate(self.jobName, name: "jobName", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-%@]*)$")
            try self.outputDataConfig.validate(name: "\(name).outputDataConfig")
            try self.redactionConfig?.validate(name: "\(name).redactionConfig")
        }

        private enum CodingKeys: String, CodingKey {
            case clientRequestToken = "ClientRequestToken"
            case dataAccessRoleArn = "DataAccessRoleArn"
            case inputDataConfig = "InputDataConfig"
            case jobName = "JobName"
            case languageCode = "LanguageCode"
            case mode = "Mode"
            case outputDataConfig = "OutputDataConfig"
            case redactionConfig = "RedactionConfig"
        }
    }

    public struct StartPiiEntitiesDetectionJobResponse: AWSDecodableShape {
        /// The identifier generated for the job.
        public let jobId: String?
        /// The status of the job.
        public let jobStatus: JobStatus?

        public init(jobId: String? = nil, jobStatus: JobStatus? = nil) {
            self.jobId = jobId
            self.jobStatus = jobStatus
        }

        private enum CodingKeys: String, CodingKey {
            case jobId = "JobId"
            case jobStatus = "JobStatus"
        }
    }

    public struct StartSentimentDetectionJobRequest: AWSEncodableShape {
        /// A unique identifier for the request. If you don't set the client request token, Amazon Comprehend generates one.
        public let clientRequestToken: String?
        /// The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that grants Amazon Comprehend read access to your input data. For more information, see https://docs.aws.amazon.com/comprehend/latest/dg/access-control-managing-permissions.html#auth-role-permissions.
        public let dataAccessRoleArn: String
        /// Specifies the format and location of the input data for the job.
        public let inputDataConfig: InputDataConfig
        /// The identifier of the job.
        public let jobName: String?
        /// The language of the input documents. You can specify any of the primary languages supported by Amazon Comprehend. All documents must be in the same language.
        public let languageCode: LanguageCode
        /// Specifies where to send the output files.
        public let outputDataConfig: OutputDataConfig
        /// ID for the AWS Key Management Service (KMS) key that Amazon Comprehend uses to encrypt data on the storage volume attached to the ML compute instance(s) that process the analysis job. The VolumeKmsKeyId can be either of the following formats:   KMS Key ID: "1234abcd-12ab-34cd-56ef-1234567890ab"    Amazon Resource Name (ARN) of a KMS Key: "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab"
        public let volumeKmsKeyId: String?
        /// Configuration parameters for an optional private Virtual Private Cloud (VPC) containing the resources you are using for your sentiment detection job. For more information, see Amazon VPC.
        public let vpcConfig: VpcConfig?

        public init(clientRequestToken: String? = StartSentimentDetectionJobRequest.idempotencyToken(), dataAccessRoleArn: String, inputDataConfig: InputDataConfig, jobName: String? = nil, languageCode: LanguageCode, outputDataConfig: OutputDataConfig, volumeKmsKeyId: String? = nil, vpcConfig: VpcConfig? = nil) {
            self.clientRequestToken = clientRequestToken
            self.dataAccessRoleArn = dataAccessRoleArn
            self.inputDataConfig = inputDataConfig
            self.jobName = jobName
            self.languageCode = languageCode
            self.outputDataConfig = outputDataConfig
            self.volumeKmsKeyId = volumeKmsKeyId
            self.vpcConfig = vpcConfig
        }

        public func validate(name: String) throws {
            try self.validate(self.clientRequestToken, name: "clientRequestToken", parent: name, max: 64)
            try self.validate(self.clientRequestToken, name: "clientRequestToken", parent: name, min: 1)
            try self.validate(self.clientRequestToken, name: "clientRequestToken", parent: name, pattern: "^[a-zA-Z0-9-]+$")
            try self.validate(self.dataAccessRoleArn, name: "dataAccessRoleArn", parent: name, max: 2048)
            try self.validate(self.dataAccessRoleArn, name: "dataAccessRoleArn", parent: name, min: 20)
            try self.validate(self.dataAccessRoleArn, name: "dataAccessRoleArn", parent: name, pattern: "arn:aws(-[^:]+)?:iam::[0-9]{12}:role/.+")
            try self.inputDataConfig.validate(name: "\(name).inputDataConfig")
            try self.validate(self.jobName, name: "jobName", parent: name, max: 256)
            try self.validate(self.jobName, name: "jobName", parent: name, min: 1)
            try self.validate(self.jobName, name: "jobName", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-%@]*)$")
            try self.outputDataConfig.validate(name: "\(name).outputDataConfig")
            try self.validate(self.volumeKmsKeyId, name: "volumeKmsKeyId", parent: name, max: 2048)
            try self.vpcConfig?.validate(name: "\(name).vpcConfig")
        }

        private enum CodingKeys: String, CodingKey {
            case clientRequestToken = "ClientRequestToken"
            case dataAccessRoleArn = "DataAccessRoleArn"
            case inputDataConfig = "InputDataConfig"
            case jobName = "JobName"
            case languageCode = "LanguageCode"
            case outputDataConfig = "OutputDataConfig"
            case volumeKmsKeyId = "VolumeKmsKeyId"
            case vpcConfig = "VpcConfig"
        }
    }

    public struct StartSentimentDetectionJobResponse: AWSDecodableShape {
        /// The identifier generated for the job. To get the status of a job, use this identifier with the operation.
        public let jobId: String?
        /// The status of the job.    SUBMITTED - The job has been received and is queued for processing.   IN_PROGRESS - Amazon Comprehend is processing the job.   COMPLETED - The job was successfully completed and the output is available.   FAILED - The job did not complete. To get details, use the operation.
        public let jobStatus: JobStatus?

        public init(jobId: String? = nil, jobStatus: JobStatus? = nil) {
            self.jobId = jobId
            self.jobStatus = jobStatus
        }

        private enum CodingKeys: String, CodingKey {
            case jobId = "JobId"
            case jobStatus = "JobStatus"
        }
    }

    public struct StartTopicsDetectionJobRequest: AWSEncodableShape {
        /// A unique identifier for the request. If you do not set the client request token, Amazon Comprehend generates one.
        public let clientRequestToken: String?
        /// The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that grants Amazon Comprehend read access to your input data. For more information, see https://docs.aws.amazon.com/comprehend/latest/dg/access-control-managing-permissions.html#auth-role-permissions.
        public let dataAccessRoleArn: String
        /// Specifies the format and location of the input data for the job.
        public let inputDataConfig: InputDataConfig
        /// The identifier of the job.
        public let jobName: String?
        /// The number of topics to detect.
        public let numberOfTopics: Int?
        /// Specifies where to send the output files. The output is a compressed archive with two files, topic-terms.csv that lists the terms associated with each topic, and doc-topics.csv that lists the documents associated with each topic
        public let outputDataConfig: OutputDataConfig
        /// ID for the AWS Key Management Service (KMS) key that Amazon Comprehend uses to encrypt data on the storage volume attached to the ML compute instance(s) that process the analysis job. The VolumeKmsKeyId can be either of the following formats:   KMS Key ID: "1234abcd-12ab-34cd-56ef-1234567890ab"    Amazon Resource Name (ARN) of a KMS Key: "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab"
        public let volumeKmsKeyId: String?
        /// Configuration parameters for an optional private Virtual Private Cloud (VPC) containing the resources you are using for your topic detection job. For more information, see Amazon VPC.
        public let vpcConfig: VpcConfig?

        public init(clientRequestToken: String? = StartTopicsDetectionJobRequest.idempotencyToken(), dataAccessRoleArn: String, inputDataConfig: InputDataConfig, jobName: String? = nil, numberOfTopics: Int? = nil, outputDataConfig: OutputDataConfig, volumeKmsKeyId: String? = nil, vpcConfig: VpcConfig? = nil) {
            self.clientRequestToken = clientRequestToken
            self.dataAccessRoleArn = dataAccessRoleArn
            self.inputDataConfig = inputDataConfig
            self.jobName = jobName
            self.numberOfTopics = numberOfTopics
            self.outputDataConfig = outputDataConfig
            self.volumeKmsKeyId = volumeKmsKeyId
            self.vpcConfig = vpcConfig
        }

        public func validate(name: String) throws {
            try self.validate(self.clientRequestToken, name: "clientRequestToken", parent: name, max: 64)
            try self.validate(self.clientRequestToken, name: "clientRequestToken", parent: name, min: 1)
            try self.validate(self.clientRequestToken, name: "clientRequestToken", parent: name, pattern: "^[a-zA-Z0-9-]+$")
            try self.validate(self.dataAccessRoleArn, name: "dataAccessRoleArn", parent: name, max: 2048)
            try self.validate(self.dataAccessRoleArn, name: "dataAccessRoleArn", parent: name, min: 20)
            try self.validate(self.dataAccessRoleArn, name: "dataAccessRoleArn", parent: name, pattern: "arn:aws(-[^:]+)?:iam::[0-9]{12}:role/.+")
            try self.inputDataConfig.validate(name: "\(name).inputDataConfig")
            try self.validate(self.jobName, name: "jobName", parent: name, max: 256)
            try self.validate(self.jobName, name: "jobName", parent: name, min: 1)
            try self.validate(self.jobName, name: "jobName", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-%@]*)$")
            try self.validate(self.numberOfTopics, name: "numberOfTopics", parent: name, max: 100)
            try self.validate(self.numberOfTopics, name: "numberOfTopics", parent: name, min: 1)
            try self.outputDataConfig.validate(name: "\(name).outputDataConfig")
            try self.validate(self.volumeKmsKeyId, name: "volumeKmsKeyId", parent: name, max: 2048)
            try self.vpcConfig?.validate(name: "\(name).vpcConfig")
        }

        private enum CodingKeys: String, CodingKey {
            case clientRequestToken = "ClientRequestToken"
            case dataAccessRoleArn = "DataAccessRoleArn"
            case inputDataConfig = "InputDataConfig"
            case jobName = "JobName"
            case numberOfTopics = "NumberOfTopics"
            case outputDataConfig = "OutputDataConfig"
            case volumeKmsKeyId = "VolumeKmsKeyId"
            case vpcConfig = "VpcConfig"
        }
    }

    public struct StartTopicsDetectionJobResponse: AWSDecodableShape {
        /// The identifier generated for the job. To get the status of the job, use this identifier with the DescribeTopicDetectionJob operation.
        public let jobId: String?
        /// The status of the job:    SUBMITTED - The job has been received and is queued for processing.   IN_PROGRESS - Amazon Comprehend is processing the job.   COMPLETED - The job was successfully completed and the output is available.   FAILED - The job did not complete. To get details, use the DescribeTopicDetectionJob operation.
        public let jobStatus: JobStatus?

        public init(jobId: String? = nil, jobStatus: JobStatus? = nil) {
            self.jobId = jobId
            self.jobStatus = jobStatus
        }

        private enum CodingKeys: String, CodingKey {
            case jobId = "JobId"
            case jobStatus = "JobStatus"
        }
    }

    public struct StopDominantLanguageDetectionJobRequest: AWSEncodableShape {
        /// The identifier of the dominant language detection job to stop.
        public let jobId: String

        public init(jobId: String) {
            self.jobId = jobId
        }

        public func validate(name: String) throws {
            try self.validate(self.jobId, name: "jobId", parent: name, max: 32)
            try self.validate(self.jobId, name: "jobId", parent: name, min: 1)
            try self.validate(self.jobId, name: "jobId", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-%@]*)$")
        }

        private enum CodingKeys: String, CodingKey {
            case jobId = "JobId"
        }
    }

    public struct StopDominantLanguageDetectionJobResponse: AWSDecodableShape {
        /// The identifier of the dominant language detection job to stop.
        public let jobId: String?
        /// Either STOP_REQUESTED if the job is currently running, or STOPPED if the job was previously stopped with the StopDominantLanguageDetectionJob operation.
        public let jobStatus: JobStatus?

        public init(jobId: String? = nil, jobStatus: JobStatus? = nil) {
            self.jobId = jobId
            self.jobStatus = jobStatus
        }

        private enum CodingKeys: String, CodingKey {
            case jobId = "JobId"
            case jobStatus = "JobStatus"
        }
    }

    public struct StopEntitiesDetectionJobRequest: AWSEncodableShape {
        /// The identifier of the entities detection job to stop.
        public let jobId: String

        public init(jobId: String) {
            self.jobId = jobId
        }

        public func validate(name: String) throws {
            try self.validate(self.jobId, name: "jobId", parent: name, max: 32)
            try self.validate(self.jobId, name: "jobId", parent: name, min: 1)
            try self.validate(self.jobId, name: "jobId", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-%@]*)$")
        }

        private enum CodingKeys: String, CodingKey {
            case jobId = "JobId"
        }
    }

    public struct StopEntitiesDetectionJobResponse: AWSDecodableShape {
        /// The identifier of the entities detection job to stop.
        public let jobId: String?
        /// Either STOP_REQUESTED if the job is currently running, or STOPPED if the job was previously stopped with the StopEntitiesDetectionJob operation.
        public let jobStatus: JobStatus?

        public init(jobId: String? = nil, jobStatus: JobStatus? = nil) {
            self.jobId = jobId
            self.jobStatus = jobStatus
        }

        private enum CodingKeys: String, CodingKey {
            case jobId = "JobId"
            case jobStatus = "JobStatus"
        }
    }

    public struct StopEventsDetectionJobRequest: AWSEncodableShape {
        /// The identifier of the events detection job to stop.
        public let jobId: String

        public init(jobId: String) {
            self.jobId = jobId
        }

        public func validate(name: String) throws {
            try self.validate(self.jobId, name: "jobId", parent: name, max: 32)
            try self.validate(self.jobId, name: "jobId", parent: name, min: 1)
            try self.validate(self.jobId, name: "jobId", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-%@]*)$")
        }

        private enum CodingKeys: String, CodingKey {
            case jobId = "JobId"
        }
    }

    public struct StopEventsDetectionJobResponse: AWSDecodableShape {
        /// The identifier of the events detection job to stop.
        public let jobId: String?
        /// The status of the events detection job.
        public let jobStatus: JobStatus?

        public init(jobId: String? = nil, jobStatus: JobStatus? = nil) {
            self.jobId = jobId
            self.jobStatus = jobStatus
        }

        private enum CodingKeys: String, CodingKey {
            case jobId = "JobId"
            case jobStatus = "JobStatus"
        }
    }

    public struct StopKeyPhrasesDetectionJobRequest: AWSEncodableShape {
        /// The identifier of the key phrases detection job to stop.
        public let jobId: String

        public init(jobId: String) {
            self.jobId = jobId
        }

        public func validate(name: String) throws {
            try self.validate(self.jobId, name: "jobId", parent: name, max: 32)
            try self.validate(self.jobId, name: "jobId", parent: name, min: 1)
            try self.validate(self.jobId, name: "jobId", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-%@]*)$")
        }

        private enum CodingKeys: String, CodingKey {
            case jobId = "JobId"
        }
    }

    public struct StopKeyPhrasesDetectionJobResponse: AWSDecodableShape {
        /// The identifier of the key phrases detection job to stop.
        public let jobId: String?
        /// Either STOP_REQUESTED if the job is currently running, or STOPPED if the job was previously stopped with the StopKeyPhrasesDetectionJob operation.
        public let jobStatus: JobStatus?

        public init(jobId: String? = nil, jobStatus: JobStatus? = nil) {
            self.jobId = jobId
            self.jobStatus = jobStatus
        }

        private enum CodingKeys: String, CodingKey {
            case jobId = "JobId"
            case jobStatus = "JobStatus"
        }
    }

    public struct StopPiiEntitiesDetectionJobRequest: AWSEncodableShape {
        /// The identifier of the PII entities detection job to stop.
        public let jobId: String

        public init(jobId: String) {
            self.jobId = jobId
        }

        public func validate(name: String) throws {
            try self.validate(self.jobId, name: "jobId", parent: name, max: 32)
            try self.validate(self.jobId, name: "jobId", parent: name, min: 1)
            try self.validate(self.jobId, name: "jobId", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-%@]*)$")
        }

        private enum CodingKeys: String, CodingKey {
            case jobId = "JobId"
        }
    }

    public struct StopPiiEntitiesDetectionJobResponse: AWSDecodableShape {
        /// The identifier of the PII entities detection job to stop.
        public let jobId: String?
        /// The status of the PII entities detection job.
        public let jobStatus: JobStatus?

        public init(jobId: String? = nil, jobStatus: JobStatus? = nil) {
            self.jobId = jobId
            self.jobStatus = jobStatus
        }

        private enum CodingKeys: String, CodingKey {
            case jobId = "JobId"
            case jobStatus = "JobStatus"
        }
    }

    public struct StopSentimentDetectionJobRequest: AWSEncodableShape {
        /// The identifier of the sentiment detection job to stop.
        public let jobId: String

        public init(jobId: String) {
            self.jobId = jobId
        }

        public func validate(name: String) throws {
            try self.validate(self.jobId, name: "jobId", parent: name, max: 32)
            try self.validate(self.jobId, name: "jobId", parent: name, min: 1)
            try self.validate(self.jobId, name: "jobId", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-%@]*)$")
        }

        private enum CodingKeys: String, CodingKey {
            case jobId = "JobId"
        }
    }

    public struct StopSentimentDetectionJobResponse: AWSDecodableShape {
        /// The identifier of the sentiment detection job to stop.
        public let jobId: String?
        /// Either STOP_REQUESTED if the job is currently running, or STOPPED if the job was previously stopped with the StopSentimentDetectionJob operation.
        public let jobStatus: JobStatus?

        public init(jobId: String? = nil, jobStatus: JobStatus? = nil) {
            self.jobId = jobId
            self.jobStatus = jobStatus
        }

        private enum CodingKeys: String, CodingKey {
            case jobId = "JobId"
            case jobStatus = "JobStatus"
        }
    }

    public struct StopTrainingDocumentClassifierRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) that identifies the document classifier currently being trained.
        public let documentClassifierArn: String

        public init(documentClassifierArn: String) {
            self.documentClassifierArn = documentClassifierArn
        }

        public func validate(name: String) throws {
            try self.validate(self.documentClassifierArn, name: "documentClassifierArn", parent: name, max: 256)
            try self.validate(self.documentClassifierArn, name: "documentClassifierArn", parent: name, pattern: "arn:aws(-[^:]+)?:comprehend:[a-zA-Z0-9-]*:[0-9]{12}:document-classifier/[a-zA-Z0-9](-*[a-zA-Z0-9])*")
        }

        private enum CodingKeys: String, CodingKey {
            case documentClassifierArn = "DocumentClassifierArn"
        }
    }

    public struct StopTrainingDocumentClassifierResponse: AWSDecodableShape {
        public init() {}
    }

    public struct StopTrainingEntityRecognizerRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) that identifies the entity recognizer currently being trained.
        public let entityRecognizerArn: String

        public init(entityRecognizerArn: String) {
            self.entityRecognizerArn = entityRecognizerArn
        }

        public func validate(name: String) throws {
            try self.validate(self.entityRecognizerArn, name: "entityRecognizerArn", parent: name, max: 256)
            try self.validate(self.entityRecognizerArn, name: "entityRecognizerArn", parent: name, pattern: "arn:aws(-[^:]+)?:comprehend:[a-zA-Z0-9-]*:[0-9]{12}:entity-recognizer/[a-zA-Z0-9](-*[a-zA-Z0-9])*")
        }

        private enum CodingKeys: String, CodingKey {
            case entityRecognizerArn = "EntityRecognizerArn"
        }
    }

    public struct StopTrainingEntityRecognizerResponse: AWSDecodableShape {
        public init() {}
    }

    public struct SyntaxToken: AWSDecodableShape {
        /// The zero-based offset from the beginning of the source text to the first character in the word.
        public let beginOffset: Int?
        /// The zero-based offset from the beginning of the source text to the last character in the word.
        public let endOffset: Int?
        /// Provides the part of speech label and the confidence level that Amazon Comprehend has that the part of speech was correctly identified. For more information, see how-syntax.
        public let partOfSpeech: PartOfSpeechTag?
        /// The word that was recognized in the source text.
        public let text: String?
        /// A unique identifier for a token.
        public let tokenId: Int?

        public init(beginOffset: Int? = nil, endOffset: Int? = nil, partOfSpeech: PartOfSpeechTag? = nil, text: String? = nil, tokenId: Int? = nil) {
            self.beginOffset = beginOffset
            self.endOffset = endOffset
            self.partOfSpeech = partOfSpeech
            self.text = text
            self.tokenId = tokenId
        }

        private enum CodingKeys: String, CodingKey {
            case beginOffset = "BeginOffset"
            case endOffset = "EndOffset"
            case partOfSpeech = "PartOfSpeech"
            case text = "Text"
            case tokenId = "TokenId"
        }
    }

    public struct Tag: AWSEncodableShape & AWSDecodableShape {
        /// The initial part of a key-value pair that forms a tag associated with a given resource. For instance, if you want to show which resources are used by which departments, you might use “Department” as the key portion of the pair, with multiple possible values such as “sales,” “legal,” and “administration.”
        public let key: String
        ///  The second part of a key-value pair that forms a tag associated with a given resource. For instance, if you want to show which resources are used by which departments, you might use “Department” as the initial (key) portion of the pair, with a value of “sales” to indicate the sales department.
        public let value: String?

        public init(key: String, value: String? = nil) {
            self.key = key
            self.value = value
        }

        public func validate(name: String) throws {
            try self.validate(self.key, name: "key", parent: name, max: 128)
            try self.validate(self.key, name: "key", parent: name, min: 1)
            try self.validate(self.value, name: "value", parent: name, max: 256)
            try self.validate(self.value, name: "value", parent: name, min: 0)
        }

        private enum CodingKeys: String, CodingKey {
            case key = "Key"
            case value = "Value"
        }
    }

    public struct TagResourceRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the given Amazon Comprehend resource to which you want to associate the tags.
        public let resourceArn: String
        /// Tags being associated with a specific Amazon Comprehend resource. There can be a maximum of 50 tags (both existing and pending) associated with a specific resource.
        public let tags: [Tag]

        public init(resourceArn: String, tags: [Tag]) {
            self.resourceArn = resourceArn
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, max: 256)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, pattern: "arn:aws(-[^:]+)?:comprehend:[a-zA-Z0-9-]*:[0-9]{12}:[a-zA-Z0-9-]{1,64}/[a-zA-Z0-9](-*[a-zA-Z0-9])*")
            try self.tags.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case resourceArn = "ResourceArn"
            case tags = "Tags"
        }
    }

    public struct TagResourceResponse: AWSDecodableShape {
        public init() {}
    }

    public struct TopicsDetectionJobFilter: AWSEncodableShape {
        public let jobName: String?
        /// Filters the list of topic detection jobs based on job status. Returns only jobs with the specified status.
        public let jobStatus: JobStatus?
        /// Filters the list of jobs based on the time that the job was submitted for processing. Only returns jobs submitted after the specified time. Jobs are returned in ascending order, oldest to newest.
        public let submitTimeAfter: Date?
        /// Filters the list of jobs based on the time that the job was submitted for processing. Only returns jobs submitted before the specified time. Jobs are returned in descending order, newest to oldest.
        public let submitTimeBefore: Date?

        public init(jobName: String? = nil, jobStatus: JobStatus? = nil, submitTimeAfter: Date? = nil, submitTimeBefore: Date? = nil) {
            self.jobName = jobName
            self.jobStatus = jobStatus
            self.submitTimeAfter = submitTimeAfter
            self.submitTimeBefore = submitTimeBefore
        }

        public func validate(name: String) throws {
            try self.validate(self.jobName, name: "jobName", parent: name, max: 256)
            try self.validate(self.jobName, name: "jobName", parent: name, min: 1)
            try self.validate(self.jobName, name: "jobName", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-%@]*)$")
        }

        private enum CodingKeys: String, CodingKey {
            case jobName = "JobName"
            case jobStatus = "JobStatus"
            case submitTimeAfter = "SubmitTimeAfter"
            case submitTimeBefore = "SubmitTimeBefore"
        }
    }

    public struct TopicsDetectionJobProperties: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the AWS Identity and Management (IAM) role that grants Amazon Comprehend read access to your job data.
        public let dataAccessRoleArn: String?
        /// The time that the topic detection job was completed.
        public let endTime: Date?
        /// The input data configuration supplied when you created the topic detection job.
        public let inputDataConfig: InputDataConfig?
        /// The identifier assigned to the topic detection job.
        public let jobId: String?
        /// The name of the topic detection job.
        public let jobName: String?
        /// The current status of the topic detection job. If the status is Failed, the reason for the failure is shown in the Message field.
        public let jobStatus: JobStatus?
        /// A description for the status of a job.
        public let message: String?
        /// The number of topics to detect supplied when you created the topic detection job. The default is 10.
        public let numberOfTopics: Int?
        /// The output data configuration supplied when you created the topic detection job.
        public let outputDataConfig: OutputDataConfig?
        /// The time that the topic detection job was submitted for processing.
        public let submitTime: Date?
        /// ID for the AWS Key Management Service (KMS) key that Amazon Comprehend uses to encrypt data on the storage volume attached to the ML compute instance(s) that process the analysis job. The VolumeKmsKeyId can be either of the following formats:   KMS Key ID: "1234abcd-12ab-34cd-56ef-1234567890ab"    Amazon Resource Name (ARN) of a KMS Key: "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab"
        public let volumeKmsKeyId: String?
        /// Configuration parameters for a private Virtual Private Cloud (VPC) containing the resources you are using for your topic detection job. For more information, see Amazon VPC.
        public let vpcConfig: VpcConfig?

        public init(dataAccessRoleArn: String? = nil, endTime: Date? = nil, inputDataConfig: InputDataConfig? = nil, jobId: String? = nil, jobName: String? = nil, jobStatus: JobStatus? = nil, message: String? = nil, numberOfTopics: Int? = nil, outputDataConfig: OutputDataConfig? = nil, submitTime: Date? = nil, volumeKmsKeyId: String? = nil, vpcConfig: VpcConfig? = nil) {
            self.dataAccessRoleArn = dataAccessRoleArn
            self.endTime = endTime
            self.inputDataConfig = inputDataConfig
            self.jobId = jobId
            self.jobName = jobName
            self.jobStatus = jobStatus
            self.message = message
            self.numberOfTopics = numberOfTopics
            self.outputDataConfig = outputDataConfig
            self.submitTime = submitTime
            self.volumeKmsKeyId = volumeKmsKeyId
            self.vpcConfig = vpcConfig
        }

        private enum CodingKeys: String, CodingKey {
            case dataAccessRoleArn = "DataAccessRoleArn"
            case endTime = "EndTime"
            case inputDataConfig = "InputDataConfig"
            case jobId = "JobId"
            case jobName = "JobName"
            case jobStatus = "JobStatus"
            case message = "Message"
            case numberOfTopics = "NumberOfTopics"
            case outputDataConfig = "OutputDataConfig"
            case submitTime = "SubmitTime"
            case volumeKmsKeyId = "VolumeKmsKeyId"
            case vpcConfig = "VpcConfig"
        }
    }

    public struct UntagResourceRequest: AWSEncodableShape {
        ///  The Amazon Resource Name (ARN) of the given Amazon Comprehend resource from which you want to remove the tags.
        public let resourceArn: String
        /// The initial part of a key-value pair that forms a tag being removed from a given resource. For example, a tag with "Sales" as the key might be added to a resource to indicate its use by the sales department. Keys must be unique and cannot be duplicated for a particular resource.
        public let tagKeys: [String]

        public init(resourceArn: String, tagKeys: [String]) {
            self.resourceArn = resourceArn
            self.tagKeys = tagKeys
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, max: 256)
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, pattern: "arn:aws(-[^:]+)?:comprehend:[a-zA-Z0-9-]*:[0-9]{12}:[a-zA-Z0-9-]{1,64}/[a-zA-Z0-9](-*[a-zA-Z0-9])*")
            try self.tagKeys.forEach {
                try validate($0, name: "tagKeys[]", parent: name, max: 128)
                try validate($0, name: "tagKeys[]", parent: name, min: 1)
            }
        }

        private enum CodingKeys: String, CodingKey {
            case resourceArn = "ResourceArn"
            case tagKeys = "TagKeys"
        }
    }

    public struct UntagResourceResponse: AWSDecodableShape {
        public init() {}
    }

    public struct UpdateEndpointRequest: AWSEncodableShape {
        ///  The desired number of inference units to be used by the model using this endpoint. Each inference unit represents of a throughput of 100 characters per second.
        public let desiredInferenceUnits: Int
        /// The Amazon Resource Number (ARN) of the endpoint being updated.
        public let endpointArn: String

        public init(desiredInferenceUnits: Int, endpointArn: String) {
            self.desiredInferenceUnits = desiredInferenceUnits
            self.endpointArn = endpointArn
        }

        public func validate(name: String) throws {
            try self.validate(self.desiredInferenceUnits, name: "desiredInferenceUnits", parent: name, min: 1)
            try self.validate(self.endpointArn, name: "endpointArn", parent: name, max: 256)
            try self.validate(self.endpointArn, name: "endpointArn", parent: name, pattern: "arn:aws(-[^:]+)?:comprehend:[a-zA-Z0-9-]*:[0-9]{12}:(document-classifier-endpoint|entity-recognizer-endpoint)/[a-zA-Z0-9](-*[a-zA-Z0-9])*")
        }

        private enum CodingKeys: String, CodingKey {
            case desiredInferenceUnits = "DesiredInferenceUnits"
            case endpointArn = "EndpointArn"
        }
    }

    public struct UpdateEndpointResponse: AWSDecodableShape {
        public init() {}
    }

    public struct VpcConfig: AWSEncodableShape & AWSDecodableShape {
        /// The ID number for a security group on an instance of your private VPC. Security groups on your VPC function serve as a virtual firewall to control inbound and outbound traffic and provides security for the resources that you’ll be accessing on the VPC. This ID number is preceded by "sg-", for instance: "sg-03b388029b0a285ea". For more information, see Security Groups for your VPC.
        public let securityGroupIds: [String]
        /// The ID for each subnet being used in your private VPC. This subnet is a subset of the a range of IPv4 addresses used by the VPC and is specific to a given availability zone in the VPC’s region. This ID number is preceded by "subnet-", for instance: "subnet-04ccf456919e69055". For more information, see VPCs and Subnets.
        public let subnets: [String]

        public init(securityGroupIds: [String], subnets: [String]) {
            self.securityGroupIds = securityGroupIds
            self.subnets = subnets
        }

        public func validate(name: String) throws {
            try self.securityGroupIds.forEach {
                try validate($0, name: "securityGroupIds[]", parent: name, max: 32)
                try validate($0, name: "securityGroupIds[]", parent: name, min: 1)
                try validate($0, name: "securityGroupIds[]", parent: name, pattern: "[-0-9a-zA-Z]+")
            }
            try self.validate(self.securityGroupIds, name: "securityGroupIds", parent: name, max: 5)
            try self.validate(self.securityGroupIds, name: "securityGroupIds", parent: name, min: 1)
            try self.subnets.forEach {
                try validate($0, name: "subnets[]", parent: name, max: 32)
                try validate($0, name: "subnets[]", parent: name, min: 1)
                try validate($0, name: "subnets[]", parent: name, pattern: "[-0-9a-zA-Z]+")
            }
            try self.validate(self.subnets, name: "subnets", parent: name, max: 16)
            try self.validate(self.subnets, name: "subnets", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case securityGroupIds = "SecurityGroupIds"
            case subnets = "Subnets"
        }
    }
}
